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

46 lines
1.5 KiB
C++

#include "audit.hpp"
#include <charconv>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
int main() {
Audit *engine = nullptr;
std::string line;
while (std::getline(std::cin, line)) {
std::istringstream input(line);
std::string token;
std::vector<int> values;
bool malformed = line.size() > 4096;
while (input >> token) {
int value = 0;
auto parsed = std::from_chars(token.data(), token.data() + token.size(), value);
if (parsed.ec != std::errc() || parsed.ptr != token.data() + token.size() || token[0] == '+') {
malformed = true;
}
if (values.size() < 64) values.push_back(value);
else malformed = true;
}
if (values.empty() && !malformed) continue;
std::vector<long long> result;
if (malformed) result = {8};
else if (values[0] == 0) {
if (values.size() != 6) result = {8};
else {
audit_destroy(engine);
engine = audit_create(values[1],values[2],values[3],values[4],values[5]);
result = {engine ? 0 : 1};
}
} else {
std::vector<int> args(values.begin() + 1, values.end());
result = audit_apply(engine, values[0], args);
}
for (std::size_t i = 0; i < result.size(); ++i) {
if (i) std::cout << ' ';
std::cout << result[i];
}
std::cout << '\n';
}
audit_destroy(engine);
}