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>
55 lines
2.7 KiB
C++
55 lines
2.7 KiB
C++
#include "deferred.hpp"
|
|
#include <iostream>
|
|
#include <string>
|
|
using namespace deferred;
|
|
int main()
|
|
{
|
|
Engine engines[2];
|
|
Engine* engine = &engines[0];
|
|
std::string op;
|
|
int id, priority, quota, index;
|
|
Number value, marker;
|
|
while (std::cin >> op) {
|
|
if (op == "U") {
|
|
std::cin >> index;
|
|
engine = &engines[index];
|
|
std::cout << index << '\n';
|
|
} else if (op == "I") {
|
|
std::cin >> id >> priority >> quota >> value;
|
|
std::cout << engine->install(id, priority, quota, value) << '\n';
|
|
} else if (op == "P") {
|
|
std::cin >> id >> value;
|
|
std::cout << engine->post(id, value) << '\n';
|
|
} else if (op == "D") {
|
|
std::cin >> id;
|
|
std::cout << engine->disable(id) << '\n';
|
|
} else if (op == "N") {
|
|
std::cin >> id;
|
|
std::cout << engine->disable_nosync(id) << '\n';
|
|
} else if (op == "E") {
|
|
std::cin >> id;
|
|
std::cout << engine->enable(id) << '\n';
|
|
} else if (op == "K") {
|
|
std::cin >> id;
|
|
std::cout << engine->kill(id) << '\n';
|
|
} else if (op == "S") {
|
|
const Action a = engine->step();
|
|
std::cout << a.kind << ' ' << a.id << ' ' << a.generation << ' ' << a.count << ' ' << a.sum << ' ' << a.value << '\n';
|
|
} else if (op == "V") {
|
|
std::cin >> id >> marker;
|
|
View v{marker, marker, marker, marker, marker, marker, marker, marker, marker, marker, marker, marker, marker, marker, marker, marker};
|
|
const int status = engine->view(id, v);
|
|
std::cout << status << ' ' << v.life << ' ' << v.generation << ' ' << v.priority << ' ' << v.quota << ' ' << v.cookie << ' ' << v.depth << ' ' << v.pending_count << ' ' << v.pending_sum << ' ' << v.pending_ticket << ' ' << v.active_count << ' ' << v.active_sum << ' ' << v.active_ticket << ' ' << v.completed_batches << ' ' << v.delivered_count << ' ' << v.delivered_sum << ' ' << v.delivered_value << '\n';
|
|
} else if (op == "G") {
|
|
const Summary s = engine->summary();
|
|
std::cout << s.installs << ' ' << s.live << ' ' << s.queued << ' ' << s.running << ' ' << s.starts << ' ' << s.finishes << ' ' << s.kills << ' ' << s.errors << ' ' << s.next_ticket << ' ' << s.events << '\n';
|
|
} else if (op == "H") {
|
|
std::cin >> index >> marker;
|
|
Event e{marker, marker, marker, marker, marker, marker, marker};
|
|
const int status = engine->event(index, e);
|
|
std::cout << status << ' ' << e.kind << ' ' << e.id << ' ' << e.generation << ' ' << e.count << ' ' << e.sum << ' ' << e.value << ' ' << e.serial << '\n';
|
|
}
|
|
}
|
|
return 0;
|
|
}
|