amos 2f32624d3b Batch 18 (20261026-C-hwe-codegen-18): add 100 calibrated HWE code-gen tasks; pause production for rollout
100 tasks from the HWE arm-linux code-gen pool (outside the lk/man/pth
range given to batch 22), each with at least one independent
contract-edge defect and plain public docs. Claude reviewed 100/100
USABLE against current digests; no ID or source overlap with main or
batch 22. Difficulty is unmeasured.

progress.md records the wrap-up: all Codex sessions and Qwen schedulers
stopped for the user's rollout, Qwen results so far (57 HARD of 373),
and what is left on each batch branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:52:13 +08:00

70 lines
1.7 KiB
C++

#include "engine_internal.hpp"
namespace deferred {
void Node::export_view(View& out) const
{
out.life = life;
out.generation = generation;
out.priority = priority;
out.quota = quota;
out.cookie = cookie;
out.depth = depth;
out.pending_count = pending.count;
out.pending_sum = pending.sum;
out.pending_ticket = pending.ticket;
out.active_count = active.count;
out.active_sum = active.sum;
out.active_ticket = active.ticket;
out.completed_batches = ledger.batches;
out.delivered_count = ledger.count;
out.delivered_sum = ledger.sum;
out.delivered_value = ledger.value;
}
int Engine::view(int id, View& out) const
{
if (!Impl::valid_id(id)) {
return BAD_ID;
}
const Node& node = state_->nodes[id];
if (node.life == VACANT) {
return MISSING;
}
node.export_view(out);
return OK;
}
Summary Engine::Impl::totals() const
{
Summary result{};
result.installs = installs;
result.live = 0;
result.queued = 0;
result.running = 0;
result.starts = starts;
result.finishes = finishes;
result.kills = kills;
result.errors = errors;
result.next_ticket = ticket;
result.events = history.size();
for (const Node& node : nodes) {
if (node.life != LIVE) {
continue;
}
result.live += 1;
if (!node.pending.empty()) {
result.queued += 1;
}
if (!node.active.empty()) {
result.running += 1;
}
}
return result;
}
Summary Engine::summary() const
{
return state_->totals();
}
int Engine::event(int index, Event& out) const
{
return state_->history.get(index, out);
}
}