Skip to content

Seal five read-path files and the egress receipt's field walker - #438

Merged
lamemustafa merged 2 commits into
masterfrom
surface/pin-read-path-files
Sep 16, 2026
Merged

lamemustafa merged 2 commits into
masterfrom
surface/pin-read-path-files

Conversation

@lamemustafa

@lamemustafa lamemustafa commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Follows #434 on #416. #434 sealed fourteen files that decide what Bridge posts or lets leave the machine. This seals six more from the same search: five whose own bodies decide what a read tells a caller or when a sync may move past rows, and agent_receipt_fields.rs, which belongs with #434's egress record (#416 listed it as borderline).

MAX_SURFACE_FILES 232 → 238

Each file is named beside the constant, five under "What a read reports, or lets a sync skip" and one under "And the egress record". Headroom stays at zero.

file what it holds
agent_movement.rs the ledger_movement tool, and its voucher predicate: cancelled, optional and entryless vouchers are left out of the figures
agent_movement_math.rs one movement row: closing = opening + debit + credit when an opening was observed; otherwise closing empty and partial / opening_balance_not_observed
agent_outstandings.rs receivable/payable totals over open bills, and the 0–30 / 31–60 / 61–90 / 90+ / unaged buckets
agent_change_parse.rs checkpoint_advanceable: not truncated, and the highest returned alter id — or the requested checkpoint when none was returned — reaches the company high-water
agent_changes.rs changed_since: applies that per axis, reports checkpoint_advanceable only when both hold, picks each axis's next alter id from its own result, refuses a checkpoint past the snapshot
agent_receipt_fields.rs released_fields, used by the egress receipt in agent_delivery.rs to record a tool response — any tool, not only reads — by key paths rather than values

Written to #434's rule — say what the file holds; "only" only where that file alone enforces it (checkpoint_advanceable = voucher && master feeding the output). Three first drafts failed that check and were narrowed against the code; the three rows above marked by a fallback, a per-axis split and a condition are the corrected wording.

"Not pinned, and deliberately"

No longer lists the read-path files. It now names observability.rs, with a reason checked against the tree: the tally_telemetry_preview Tauri command returns what it builds, but no frontend code calls that command and nothing sends the result off the machine. It becomes a candidate when something does. (An earlier framing — "no command surfaces it" — was false; the command exists, registered since July, with no caller.)

Guard

admission_and_egress_files_stay_pinned.rs gains READ_PATH_AND_RECEIPT: [&str; 6] beside ADMISSION_AND_EGRESS, sharing its two helpers rather than copying them, and the negative test now drives both lists.

Measured, not asserted — agent_movement_math.rs removed from the real surface:

read_path_files_are_still_pinned ... FAILED   (since renamed read_path_and_receipt_files_are_still_pinned)
dropped from the compatibility surface: ["src-tauri/src/agent_movement_math.rs"]

Surface restored byte-identical afterwards; all three tests pass.

Checks (local, rustc 1.96.0)

  • reseal.sh --pins-changed, then --verify current. Diff vs master: 6 pins added, 1 rehash (lib.rs), nothing else.
  • cargo fmt --check, clippy with CI's flags: clean. Workspace tests: 1,560 passed, 0 failed. Compatibility tool tests pass, including the real-tree cap invariant.

Review

Two sonnet reviews. Mechanics: all 238 hashes and the manifest digest recomputed independently, invariant test run, guard shown non-vacuous for both lists — clean. Reasons: eight of nine claims verified against the code, including >= vs >, the 91+ bucket and no cross-axis leakage; one overstatement found and fixed in the second commit — released_fields runs on the generic response path for every tool, so it is no longer framed as read-path. docs/proposed-rust-module-conventions.md stopped quoting a stale pin count.

Ordering with #436: it touches the surface/matrix hashes but not this constant or paragraph; whichever merges second reseals. #436's branch predates #434's squash, so git currently reports add/add conflicts in lib.rs and the guard file even though #436's content there is byte-identical to master; rebasing #436 onto master removes them.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

lamemustafa added a commit that referenced this pull request Sep 16, 2026
#438 raises the cap to 238; the number belongs to the constant, not the
prose.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lamemustafa lamemustafa changed the title Seal the read-path files that decide what a read reports Seal five read-path files and the egress receipt's field walker Sep 16, 2026
t and others added 2 commits September 16, 2026 14:50
Follows #434 on bridge#416. #434 pinned fourteen files that decide what Bridge
posts or lets leave the machine. This pins six more from the same search,
whose own bodies decide what a read tells a caller or when a sync may move
past rows: agent_movement.rs, agent_movement_math.rs, agent_outstandings.rs,
agent_change_parse.rs, agent_changes.rs and agent_receipt_fields.rs.
MAX_SURFACE_FILES goes 232 to 238, each file named beside it with its own
reason, headroom still zero.

Reasons follow #434's rule: say what the file holds, and use "only" only
where that file's code enforces it alone. Three first drafts failed that
check and were narrowed against the code -- checkpoint_advanceable falls back
to the requested checkpoint when a page returns nothing; changed_since applies
the predicate per axis; a closing balance exists only when an opening was
observed.

The "Not pinned, and deliberately" paragraph no longer lists these files, and
now names observability.rs with a reason that holds: tally_telemetry_preview
returns what it builds, but nothing in the frontend calls that command and
nothing sends the result off the machine.

The pin guard gains READ_PATH beside ADMISSION_AND_EGRESS. Dropping
agent_movement_math.rs from the real surface fails
read_path_files_are_still_pinned by name; restored byte-identical after.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Review traced released_fields to the generic tool-response path: it
describes the response of every tool, post_import included, not a read's.
Its own reason was accurate; the framing around it was not. The intro now
says five of the six are read-path files and places agent_receipt_fields.rs
with the egress record, which is where bridge#416 had it (borderline). The
guard's list becomes READ_PATH_AND_RECEIPT for the same reason.

docs/proposed-rust-module-conventions.md no longer quotes a pin count; it
said 218 and had been stale since #434.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lamemustafa
lamemustafa force-pushed the surface/pin-read-path-files branch from 2b83b98 to f8ede3d Compare September 16, 2026 09:20
@lamemustafa
lamemustafa enabled auto-merge (squash) September 16, 2026 09:20
@lamemustafa
lamemustafa merged commit f2e5be1 into master Sep 16, 2026
12 checks passed
@lamemustafa
lamemustafa deleted the surface/pin-read-path-files branch September 16, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant