amos 73a5240295 Batches 21 and 18: add 74 calibrated tasks (40 Bos redo, 34 HWE code-gen)
Batch 21 (20261027-A-bos-redo-21) rebuilt 40 of the 53 rejected Bos-qiao
environments: hidden assertions that ran inside the candidate's process
now run in a trusted parent that reads observations from a low-UID
worker; gold bytes are unchanged. 9 were excluded for scope (ROS2,
oversize, security core), 3 are blocked because the source requires an
exec bit the platform does not freeze, 1 lacks requests/bs4 in trace6.

Batch 18 (20261026-C-hwe-codegen-18) adds its last 34 of 134 tasks; the
first 100 landed in 2f32624d.

Claude reviewed 74/74 USABLE against current digests, canonical
families, no ID or source overlap with main, plain public docs. Only the
new task directories are taken; the stale pre-batch-20 copies of
concur-release-capsule and resource-temp-link on the batch 21 branch and
both branches' progress notes stay as main has them. Difficulty is
unmeasured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 10:23:12 +08:00

42 lines
1.2 KiB
C++

#ifndef MEMORY_HPP
#define MEMORY_HPP
#include <cstdint>
#include <memory>
#include <vector>
enum class Status { OK = 0, RANGE = 1, EXISTS = 2, ABSENT = 3, NOSPACE = 4 };
enum class Backend { NONE = 0, C = 1, V = 2 };
struct Info {
int64_t id = 0;
int64_t size = 0;
Backend backend = Backend::NONE;
int64_t token = 0;
std::vector<int64_t> pages;
};
struct ReadResult { Status status; std::vector<uint8_t> bytes; };
struct InfoResult { Status status; Info value; };
struct Stats {
int64_t c_capacity, v_capacity, c_used, v_used;
int64_t c_mappings, v_mappings, c_fail, v_fail;
uint64_t c_attempts, v_attempts;
std::vector<int64_t> ids;
};
class Memory {
public:
Memory();
~Memory();
Status reset(int64_t c_pages, int64_t v_pages);
Status arm(int64_t c_fail, int64_t v_fail);
Status allocate(int64_t id, int64_t size);
Status replace(int64_t id, int64_t size);
Status release(int64_t id);
Status fill(int64_t id, int64_t offset, int64_t count, int64_t value);
ReadResult read(int64_t id, int64_t offset, int64_t count) const;
InfoResult info(int64_t id) const;
Stats stats() const;
private:
struct Impl;
std::unique_ptr<Impl> impl;
};
#endif