Agent bash outputs (pytest, tsc, Docker builds, SQL migrations) routinely dump 200–2,000 lines of low-signal progress bars and passing boilerplate around 3–12 critical error/traceback anchor lines. Naive head/tail truncation frequently deletes mid-log tracebacks, while stochastic LLM summarizers add latency, non-determinism, and floating-point drift.
Implement an exact, purely integer (int32_t / int64_t / uint64_t) C++20 (clang++ -O3) kernel (tokendiet_salience_knapsack) with three deterministic stages:
raw_scores[i] < 800, mandatory == 0) whose 64-bit hash already appeared within the preceding 8 lines.1 <= |i - a| <= halo_radius of an anchor (raw_scores[a] >= 800 or mandatory == 1) via exact floor division raw_scores[a] / (1 + |i - a|), plus 1,000,000 mandatory priority weight.