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

53 lines
1.5 KiB
C++

#ifndef BUFFER_MODEL_DETAIL_HPP
#define BUFFER_MODEL_DETAIL_HPP
#include "buffer_model.hpp"
#include <array>
namespace buffer_capacity {
struct ResourceSlot {
bool live = false;
std::int64_t owner = 0;
std::vector<std::uint8_t> bytes;
};
class ResourceStore {
public:
std::int64_t reserve(std::int64_t owner, std::int64_t capacity, bool blocked);
std::int64_t replacement(std::int64_t old, std::int64_t owner,
std::int64_t capacity, bool blocked);
void release(std::int64_t allocation);
std::vector<std::uint8_t>& bytes(std::int64_t allocation);
const std::vector<std::uint8_t>& bytes(std::int64_t allocation) const;
std::vector<ResourceInfo> list() const;
private:
std::array<ResourceSlot, 10> slots_;
};
struct SessionSlot {
bool live = false;
std::int64_t device = 0;
std::int64_t cursor = 0;
};
class SessionStore {
public:
SessionSlot& at(std::int64_t session);
const SessionSlot& at(std::int64_t session) const;
void add(std::int64_t session, std::int64_t device);
void remove(std::int64_t session);
bool has_device(std::int64_t device) const;
void capacity_changed(std::int64_t device, std::int64_t capacity);
private:
std::array<SessionSlot, 16> slots_;
};
struct DeviceSlot {
bool live = false;
std::int64_t capacity = 0;
std::int64_t allocation = 0;
};
struct Engine::Impl {
std::array<DeviceSlot, 8> devices;
SessionStore sessions;
ResourceStore resources;
std::int64_t blocked = 0;
};
}
#endif