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

98 lines
3.7 KiB
C++

#include "wait_station.hpp"
#include <iostream>
#include <string>
using namespace waitstation;
static void record_fields(const Record &r)
{
std::cout << ' ' << r.id << ' ' << r.cell << ' ' << r.relation
<< ' ' << r.target << ' ' << r.domain << ' ' << r.deadline
<< ' ' << r.phase << ' ' << r.result;
}
int main()
{
Station stations[2];
std::string operation;
Integer slot = 0;
while (std::cin >> operation >> slot) {
Station &station = stations[static_cast<std::size_t>(slot)];
Integer a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
Code code = OK;
if (operation == "N") {
std::cin >> a >> b >> c;
code = station.reset(a, b, c);
} else if (operation == "P") {
std::cin >> a >> b;
code = station.publish(a, b);
} else if (operation == "B") {
std::cin >> a;
std::vector<Publication> items;
for (Integer i = 0; i < a; ++i) {
std::cin >> b >> c;
items.push_back({b, c});
}
code = station.publish_many(items);
} else if (operation == "W") {
std::cin >> a >> b >> c >> d >> e >> f;
code = station.watch(a, b, c, d, e, f);
} else if (operation == "A") {
std::cin >> a;
code = station.advance(a);
} else if (operation == "J") {
std::cin >> a;
code = station.adjust(a);
} else if (operation == "U") {
std::cin >> a >> b >> c;
code = station.rearm(a, b, c);
} else if (operation == "C") {
std::cin >> a;
code = station.cancel(a);
} else if (operation == "E") {
std::cin >> a;
code = station.erase(a);
} else if (operation == "I") {
Record record;
record.id = record.cell = record.relation = record.target = -777;
record.domain = record.deadline = record.phase = record.result = -777;
std::cin >> a;
code = station.inspect(a, record);
std::cout << operation << ' ' << slot << ' ' << code;
record_fields(record);
std::cout << '\n';
continue;
} else if (operation == "R" || operation == "T" || operation == "D") {
std::cin >> a;
Integer value = -777;
if (operation == "R") {
code = station.read(a, value);
} else if (operation == "T") {
code = station.time(a, value);
} else {
code = station.remaining(a, value);
}
std::cout << operation << ' ' << slot << ' ' << code;
std::cout << ' ' << value;
std::cout << '\n';
continue;
} else if (operation == "S") {
Counters counts = station.counters();
std::cout << operation << ' ' << slot << ' ' << counts.capacity
<< ' ' << counts.used << ' ' << counts.waiting
<< ' ' << counts.satisfied << ' ' << counts.expired
<< ' ' << counts.cancelled << '\n';
continue;
} else if (operation == "L" || operation == "G") {
std::cin >> a >> b;
Listing listing = operation == "L" ? station.list(a, b) : station.drain(a, b);
std::cout << operation << ' ' << slot << ' ' << listing.code
<< ' ' << listing.records.size();
for (const Record &record : listing.records) {
record_fields(record);
}
std::cout << '\n';
continue;
}
std::cout << operation << ' ' << slot << ' ' << code << '\n';
}
return 0;
}