Repository navigation
lanes: the shared price log covers the shared-drafts grant path - #4686
Conversation
|
Transparency: this PR was prepared by eXsoR65's AI agent (DeepSeek Harness), authorized and reviewed by eXsoR65 before posting. It implements the log-only shape @ashhart described in #3606 — — eXsoR65's AI agent (DeepSeek Harness) |
Move head_ms and price_log.round out of the plain-guard branch so the log records both grant paths; observeSharedPrice stays gated. Log only, pricing unchanged. Refs ashhart#3606.
91b6618 to
d580abb
Compare
|
Thank you @eXsoR65. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
What this changes
TF_SHARED_PRICE_LOG=1logs a priced shared round only on the plain-guard path; the shared-drafts grant path (allocate_shared_drafts,plain_guard=false) stays silent, so its per-depthaccept=estimates cannot be read — the gap noted in #3606. This moves thehead_mscomputation and theprice_log.roundcall out of theif (independent)branch inshared_round.zigso a timed shared-drafts round logs the same line.observeSharedPricestays inside the gate (and is itself gated byplain_guard), so pricing is unchanged: log only.min_rows1 (vs 8 standalone) — ~10 tok/s vs ~60 tok/s on M1 Max #3606 (the price-log coverage sub-task the maintainer asked for; the grant-efficiency decision and the title overlap remain open).833d8ec46562a4f34d4d81fc1b945a55aba51009).atc overlap --json: against main833d8ec46, 2026-11-22 —changedFiles: 2,overlaps: [], no conflicts reported. Coverage is incomplete (pullFilesUnavailable,otherPullRequestsLimit,timeLimit), so this is best-effort;atc who zig/src/core/lanes/shared_round.zig --jsonlikewise showed no overlapping edits.Checks on this head
91b66182760b0e14ba8e1bb513fc9267ad25a5b0python3 tools/zig/lean_check.py, on the base and on this head: base833d8ec46= 165 problems, head = 165 problems;lean_new.pyreports 0 new (the 165 are inherited; this change adds nogetenvand the test file is not counted).zig/src/core/lanes/lanes.zig, unfiltered) on Linux x86_64 / Zig 0.17.0 — 451 passed, 1 skipped, 0 failed (452 total), including the two newprice_log_test.zigcases; the three pre-existing price-log cases still pass. Falsification: with the hoist reverted, the engine-driven case fails at theprice_logassertion (450/452, 1 failed), so it guards the regression.zig fmt --check build.zig zigandgit diff --check: clean. Diff is exactlyshared_round.zig(+5/−2) andprice_log_test.zig(+59); both files ≤600 lines, comments one line ≤120 cols.zig build test test-goldenaggregate and the GPU/kernel-contract gates were not run locally (no GPU on this VM; disk-constrained). CI runs the full host shards. The change is log-only in core lanes (default off) and touches no kernel, backend, config or arithmetic;price_log.zigis untouched.Receipt
n/a — log-only diagnostic coverage.
TF_SHARED_PRICE_LOGdefaults off: with it unset nothing changes, and with it set the change only emits a log line (pricedHeadMsis pure over*const Rule;price_log.round/linewrite a line;enabledreads the env once and caches it). No rule mutation, pricing or token change on either path, so it cannot alter inference output and the inference checklist is skipped; the host checks are under "Checks on this head". The M4 Pro per-depthaccept=reading and the #4628/#4629 before/after drafter arms follow separately as discussed in #3606.Checklist