Repository navigation
batch 5: StepProfiler split + /health binary_sha256 (Refs #5577, #5348) - #5776
Conversation
…(Refs #5348 R-8) Wrapper struct flattens HealthResponse so the 17 existing literals are untouched; field omitted (never faked) when the executable cannot be read. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift
left a comment
There was a problem hiding this comment.
seat 2, aprender-triage-worker @3eced38173 APPROVE. Read: full diff vs origin/main (3 files, +138/-75). (a) step_profiler.rs: print_report split into print_layer_profile + print_latency_percentiles; guard inverted correctly (num_layers==0 || step_count==0 returns, steps<10 returns), print order and hotspot math unchanged, no logic edits. (b) router.rs: /health now serializes PinnedHealthResponse (flatten HealthResponse + optional binary_sha256, omitted when exe unreadable); sha2 is already a normal dependency of aprender-serve; status code path unchanged. Test asserts the sha equals an independent hash of current_exe and status stays ok. Non-blocking nit: the first /health call reads the whole executable inside the async handler (OnceLock init, blocking read), so a large binary delays that first probe; consider computing at startup or spawn_blocking in a follow-up. No contract/README/derived files in the PR. 0 own trailers. Not run: cargo tests, CI.
noahgift
left a comment
There was a problem hiding this comment.
seat 1, aprender-pace @3eced38173e87fd90b3a3c62389f26e9c73441e9
Read the whole PR (3 files, 138 lines, 2 commits).
- step_profiler.rs (split a of #5590): a pure extraction of print_report into print_layer_profile and print_latency_percentiles. Bodies are moved, not rewritten; the two guards are correct De Morgan inversions (
num_layers == 0 || step_count == 0,len < 10), and the latency block still runs after an early return from the layer block because it is its own call. Output strings unchanged in the diff. - router.rs (R-8):
binary_sha256()is a OnceLock over sha256 of current_exe,Noneomits the field (never faked);PinnedHealthResponseflattens the existing HealthResponse, so existing fields keep their names. sha2 is already an aprender-serve dependency. - Ran
cargo test -p aprender-serve --lib test_healthat this head: 28 passed, 0 failed, including the new test_health_reports_binary_sha256. - The R-8 quorum receipt (3/3 Opus) was on ef8ad86; I did not diff that commit against this head's R-8 commit, so I rely on the receipt only for the design, not for these exact bytes. 0 aprender-pace trailers.
Not verified: aprender-train compile/tests for the split, clippy/fmt, full CI. The follow-ups the receipt lists (blocking hash on first call in an async handler, /proc/self/exe, apr-cli /health lacking the field) are not addressed here.
|
§13.11 rung 1 — quorum shadow verdict Shadow mode: this records a verdict and merges nothing. A refusal |
noahgift
left a comment
There was a problem hiding this comment.
seat 1, aprender-pace @2236cb6eab80d11ea7dbc00ba90d7d733318ac9e
Re-seat delta vs my seat at 3eced38: a clean merge of main (9646df7). The PR's own change is identical to 3eced38 (empty diff of the two), and the PR still touches only router.rs, usage_serde_health.rs and step_profiler.rs (no witness, nt or README), so there is no generated file to re-derive. My earlier read stands.
Not verified: the serve test_health tests were run at 3eced38, not re-run on this head; train compile, clippy and CI not checked. 0 aprender-pace trailers.
noahgift
left a comment
There was a problem hiding this comment.
seat 2, aprender-triage-worker @2236cb6eab APPROVE (re-seat by delta from my seat at 3eced38). Read: log 3eced38..2236cb6 = one merge of main (9646df7, #5583); the old->new delta is only #5583's two compute/contracts test files, already on main. PR vs main is unchanged: 3 files, +138/-75 (router.rs, usage_serde_health.rs, step_profiler.rs); no derived files. My earlier nit on the first-call exe read stands (non-blocking). 0 own trailers. Not run: cargo tests, CI.
… -> 912 count bump Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift
left a comment
There was a problem hiding this comment.
no seat, aprender-pace @bf098b115ebed94c09750d6dffdcc40bc35630c7 (defects)
The PR's own delta vs my seat at 2236cb6 is 83 changed lines, not a clean main merge:
- contracts/shapes.ttl differs from origin/main in 68 lines: the head has
sh:node <.../shape/ladder-green/node>(and the same for parity-receipt-complete, parity-comparator-, release-readiness-v1.) where main and the previous head have.../node/parityReceipt,/node/comparator,/node/hostReceipt, etc. The PR has no business changing these; it looks like a regen with a stale pv. The contracts regen check would likely go red. - docs/audits/surface_audit.csv +1 row (
GET /health binary_sha256) with the 911->912 bumps in apr-dogfood-coverage-v1.yaml and SKILL.md: plausible for R-8, consistent, but new since my last seat.
Fix: rebuild pv from HEAD,make contracts, confirm shapes.ttl matches main apart from this PR. Source files (router.rs, step_profiler.rs, usage_serde_health.rs) not re-read in full at this head.
Not verified: tests, CI, clippy, pv re-derivation.
noahgift
left a comment
There was a problem hiding this comment.
seat 2, aprender-triage-worker @bf098b115e NOT APPROVED (re-seat by delta from my seat at 2236cb6). The new commit's regen came from a STALE pv binary and undoes two fixes already on main: (1) contracts/shapes.ttl changes 34 lines, rewriting nested shape IRIs from /node/ (e.g. .../ladder-green/node/parityReceipt, which is what origin/main's ontology/shapes.rs:642 emits) to bare /node; (2) the witness adds reasoner_git_sha and cpu_ms, the volatile fields #5752 (bf957b2) stopped writing. A regen with the in-tree pv at this head would reproduce neither, so the ont4b shapes-freshness / witness check should go RED. Fix: git checkout origin/main -- contracts/shapes.ttl, rebuild pv from this tree, rerun make contracts, and push; expect shapes.ttl untouched, the witness changing only in census_id_set_sha256, README/ledger +1 only. Rest of the delta read and fine: apr-dogfood-coverage 911->912 in all five places (metadata ref, overall rows/ratio 0.1579, T2 invariant, falsifier text) and SKILL.md matches; surface_audit.csv gains exactly one row 'GET /health binary_sha256' (+1 = 912), contracts.nt +2 auditRow triples for it. Not run: contracts_gate.sh (a run would confirm RED), cargo tests, CI. 0 own trailers.
…built from HEAD Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift
left a comment
There was a problem hiding this comment.
seat 2, aprender-triage-worker @6b1e520094 APPROVE (re-seat after my NOT APPROVED at bf098b1). Blocker cleared: against origin/main d5dedf1, contracts/shapes.ttl has 0 diff lines and the witness has no diff (no new contract, so no census change); README untouched. Remaining derived change is contracts.nt +2/-0 (the two auditRow triples for 'GET /health binary_sha256'). PR vs main is now 7 files, +147/-81: router.rs, usage_serde_health.rs, step_profiler.rs (read earlier, unchanged), apr-dogfood-coverage yaml 911->912 in all places + SKILL.md, one surface_audit.csv row. 0 own trailers. Not run: contracts_gate.sh, cargo tests, CI.
noahgift
left a comment
There was a problem hiding this comment.
seat 2, aprender-pace @6b1e5200940f8dacf70d7631ee6d5f707cdb56e3
My earlier defect at bf098b1 is cleared: contracts/shapes.ttl is now identical to origin/main (0 diff lines).
Versus my seat at 2236cb6, the PR's own change differs only by the ledger row for the /health binary_sha256 surface: surface_audit.csv now has 912 data rows (1 matching row, pointing at router.rs:89, the /health route), and the 911->912 bumps in apr-dogfood-coverage-v1.yaml and SKILL.md agree with it. Source changes unchanged. 0 aprender-pace trailers.
Not verified: tests, CI, clippy, pv re-derivation of nt/witness.
…egenerates (Refs #5762) pv_bin.sh builds --bin pv only, so pv-sat stayed whatever an earlier build left (the #5776 stale-verifier regen, ~25 min). Build both with cargo (its fingerprint is the freshness authority) before pv_bin.sh snapshots them and before the conflicted files are dropped; ignore an inherited PV_SAT. Supersedes the mtime guard, which a quorum lane showed refuses on merged non-compiled files and a lane found a corrupted header in. Run against a real build: a touched pv-sat source is rebuilt and snapshotted, a fresh tree regenerates with no diff. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Pmat-Ticket: #5762 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…elines re-derive from the ledger Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift
left a comment
There was a problem hiding this comment.
seat 2, aprender-triage-worker @261e6a26084e108c011e34f737049d6866cb1d53 APPROVE
Re-seat by delta from my last seat (6b1e520): 0 own trailers on the PR; delta is 2 files. surface_audit.csv: the new GET /health binary_sha256 row in_dogfood_skill yes→no (the sweep does not reach it, consistent with other ungated rows). apr-dogfood-coverage-v1.yaml baselines: apr 390→391 (covered stays 144), http-apr-serve 45→46 (covered 40; 40/46 = 87.0% matches the new comment), q9_10 21→22 (covered 20; 20/22 = 90.9% matches). Covered never decreases and totals rise by exactly the one added row, as the contract note requires. Read: the delta and the baseline block at the PR head. Not run: dogfood_baseline.py --check (taking a3's PASS as reported), cargo, pv.
noahgift
left a comment
There was a problem hiding this comment.
seat 2, aprender-pace @261e6a26084e108c011e34f737049d6866cb1d53
Re-seat. Delta vs my seat at 6b1e520 is the one commit 261e6a2 (dogfood baselines only); the serve change is untouched.
- The new ledger row
GET /health binary_sha256isin_dogfood_skill=no: no dogfood gate covers it, so the row is honest as ungated. Covered stays 144. - Totals move by exactly one row each, nothing else: overall 911→912, apr 390→391, http-apr-serve 45→46, q9_10 21→22. Ratio 144/912 = 0.1579 (comment 15.8%); http-apr-serve 40/46 = 87.0%. The SKILL.md and the T2 invariant/falsification text carry 912 to match.
Not verified: I did not rundogfood_baseline.py --checkor the contract gates myself (a3 reports PASS); I did not rebuild generated files.
… line; more PV var names (#5776) Lane A/B defects at de08d93. Each fix has a case row or a surface probe and its own RED mutation. Probe count in the OK line now derives from a counter. Residual, stated not fixed: YAML 'PV: pv', "$CARGO_HOME"/bin/pv, ~/.cargo/bin//pv, $B/pv indirection, and '[ -x ~/.cargo/bin/pv ] || exit' is flagged (safe direction). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Batch 5
Two pieces, no file overlap, 138 changed lines, no gate or workflow file:
step_profiler.rsrouter.rs+usage_serde_health.rs; quorum 3/3 APPROVE, degraded same-family: /mnt/nvme-raid0/cop-inbox/quorum-w5018/r8-receipt.mdLeft out: #4699 (375 lines, over the 200 cap, until split).
Local gate (lambda, alone, main merged, regen produced no diff): validate_contracts and the tree-reader check pass. The workspace nextest run had not finished when this was opened: aprender-serve qwen35 model-load tests are refused by the host RAM check (HostRamRefused under the cgroup memory cap) and run for 9+ minutes, so they are not_measured locally. They do not touch these files. CI's full gate decides.
keep-open: no
ont-delta: none (no README or ontology change; regen after merging main produced no diff)
🤖 Generated with Claude Code