Repository navigation
[CTX-0331] docs(security): record the V-26 replaced-inode and symlink tamper variants and the AC-022 live ctl cells - #526
Conversation
… tamper variants and the AC-022 live ctl cells
Xuepoo
left a comment
There was a problem hiding this comment.
Independent review of PR #526 ([CTX-0331] docs(security): record the V-26 replaced-inode and symlink tamper variants and the AC-022 live ctl cells) — head 37ccab55e1902af5095225f487c696fb494ce644 (confirmed via git ls-remote at review start), base origin/main 9c2f4b8. Mechanism claims were cross-checked against the bitty source at origin/main 48f297d9; corpus conventions were compared against the 2026-11-21 record. All eight numbered checks executed; status/State cells were compared cell-by-cell programmatically between origin/main and the head, not by eye.
-
PASS — RECORD-DONT-FLIP. No status or State column flipped:
P0-AC-021staysVerified (Linux x86_64)/Partially verified(docs/security/p0-acceptance-criteria.md:807),P0-AC-022staysPartially verified/Partially verified(:808), rowsP0-AC-023..026identical after whitespace normalization (prettier re-padding only);DR-02staysOpen(docs/security/risk-register.md:191, State verified unchanged for every DR and R row); evidence-matrixDR-02staysOpen(docs/security/evidence-matrix.md:187). The content diff touches only evidence + residual cells: p0-acceptance-criteria rows 021/022 evidence+residual columns plus the campaign-status intro (:796-802); risk-registerDR-02mitigation/exit-evidence cell (:191); evidence-matrixDR-02remaining-gap cell (:187), the residual cells of the 2026-11-16/2026-11-21 campaign rows, the residual bullets, and the new 2026-11-22 subsection (:542). One line: no criterion or risk moved, evidence cells only. -
PASS — HONEST DIVERGENCE. The record states the non-removal as observed behavior and does not editorialize it into compliance: bittyd-v26-variants-2026-11-22.md:36-44 ("recorded exactly as observed … the socket path is not removed on the way out"), :204-208 (the shutdown identity check), :256-261 ("The socket path is not claimed removed"), explicitly contrasted with the 2026-11-21 chmod variant's removed path (:38-39; bittyd-frozen-vector-runs-2026-11-21.md:180, :291-293). Mechanism confirmed in
bittyat48f297d9:remove_owned_socket(crates/bitty-daemon/src/endpoint.rs:617-649) reads the path withsymlink_metadata, refuses a symlink (TamperKind::Symlink), and refuses the unlink when observed dev/ino/uid identity differs from the bound identity (TamperKind::Replaced, "nothing is unlinked in that case") — so the planted plain file and the symlink both survive shutdown;BoundEndpoint::reattest(endpoint.rs:586-598) re-stats viasymlink_metadata, so a symlink fails before the target is ever consulted andattest_socket_metadata/attest_existing_socket(endpoint.rs:958) fails a plain file on the socket-type check before mode or owner;TAMPER_INTERVAL_MS = 5_000(crates/bitty-daemon/src/service/server.rs:72) matches the recorded5.26 s; the single tamper line is verbatim (crates/bitty-daemon/src/cli.rs:274); server.rs:867 drives the re-attestation exit. The chmod variant still removed its path because the identity check passed there — the recorded divergence is real, observed, and honestly framed. -
PASS — OBSERVED-FIRST DISCIPLINE. Both tamper variants observe the endpoint serving over the real transport before the tamper, matching the 2026-11-21 construction: replaced-inode —
srw------- (600)stat,daemon.negotiateokendpoint_kind=unix_socket,daemon.statusrunningtcp_listeners=0active_sessions=0(bittyd-v26-variants-2026-11-22.md:162 cell row, :175-181 transcript), then the tamper, then exit6at5.26 s(:185-187); symlink — the same served-first observation on a second isolated daemon with its own 32-hexdaemon_instance_id(:163, :218-220), exit6at5.26 s(:224-226). Exit codes and timings are recorded per run; the companion live-ctl record records exit codes per cell (rc=0/0/6/7, bittyd-ac022-live-ctl-2026-11-22.md:129-142). -
PASS — AC-022 LIVE CELLS. The terminal send/text allow rows are not vacuous: the
terminal textread-back grid carries the exact line cell 1 sent (sh-5.3$ echo ctx-0331-terminal-send) — bittyd-ac022-live-ctl-2026-11-22.md:118 (cell table), :132 (transcript), :145-148 ("the allow row is not a vacuousok"). The window-new row is recorded exactly as the record text the check requires: the headless servo's exit6Unavailablerefusal "recorded as observed, not as the allow cell" (:119), and the allow cell is declared a typed skip — it needs a windowed instance, the host compositor is out of scope by the GUI-testing ban, and no nested/virtual display exists on the host (:26-36, :172-186, :190-192, :214-216). Mechanism corroborated in source:bitty.debug/spawnTerminalrequiresterminal.manage(bitty-ipc18a1432, crates/bitty-ipc-devtools/src/ctl.rs:29, :796); the Unserviced message is verbatim (crates/bitty-terminal/src/ctl/new_window.rs:118); the exit mapping is Denied=7 / Unavailable=6 (crates/bitty-terminal/src/cmd.rs:29, src/ctl.rs:63, src/ctl/render.rs:81);ScopeSet::cli_default()holds exactly the six scopes the record quotes (bitty-ipc crates/bitty-ipc-api/src/scope.rs:271) andelevation_from_envis union-only — it starts from the CLI default and only inserts (crates/bitty-ipc-devtools/src/ctl.rs:2565), viaConnectionServices::from_process_envread once at listener start (crates/bitty-terminal/src/ipc_serve.rs:918) — so the record's claim that no CLI-shaped live deny arm exists for these verbs at this revision is source-accurate. -
FAIL — BUILD IDENTITY. The pinning half passes: bitty SHA
48f297d9pinned (bittyd-v26-variants-2026-11-22.md:81; bittyd-ac022-live-ctl-2026-11-22.md:83); binary SHA-256 digests recorded (bittyd plain3ce1b84d…v26:96-97, test-seams802b9dbd…v26:102-103, bitty terminal61572b6a…v26:117-118 and ac022:88-89); and which binary ran which cells is stated (v26:99-100 "every out-of-harness cell ran against it", v26:104-106 the test-seams build "is not the binary the cells below ran", ac022:86-87 "the terminal binary for these cells"). But the discarded git-archive build with the wrong embedded revision is NOT disclosed: zero occurrences of "archive" in both new records, evidence-matrix.md, p0-acceptance-criteria.md, and risk-register.md (per-file grep count 0); nothing in the PR body's Build identity section; the PR has zero comments and zero reviews; the commit message is title-only; and the carryctx CTX-0331 notes, events, decisions, and handoffs contain no mention. The records state only the final driver-built/detached-clone path with the correct(dev 48f297d9). FAIL-unverified: the required disclosure could not be found anywhere in the PR. Fix: add a build-history sentence to the records' Source identity sections naming the discarded git-archive build and its wrong embedded revision (or state that no archive build was attempted), then re-run the gates. -
PASS — CORPUS CONVENTIONS. Both records match the 2026-11-21 record's structure: same frontmatter schema with sequential
sidebar_order65/66 (bittyd-v26-variants-2026-11-22.md:1-10, bittyd-ac022-live-ctl-2026-11-22.md:1-10 vs bittyd-frozen-vector-runs-2026-11-21.md:1-10), dated titles (:12), "Status: dated evidence record; independent review pending." (:14), Purpose with In/Out of scope, Source identity, Isolation and safety, a per-run cell table with Command + Observed columns and full ```sh transcripts, "What this record does not claim", "Effect on the evidence matrix", "Residual blockers", References. Typed skips declared: owner-change (v26:71-73, :252-255, :291-293), second-uid/V-25(:76, :294-295), Windows/`V-27` (:76, :296-297; ac022:75, :222). No hardcoded host usernames or host-specific absolute paths: grep for `fuyu|/home/|/mnt/data` = 0 hits in both new records; transcripts are written `/run-…/…` (v26:143-144), matching the 2026-11-21 phrasing `/runN/…` (frozen-vector:158-159); the host line carries `uid `1000`` with no username (v26:120-121, ac022:96), matching frozen-vector:131. The risk-register `DR-02` note (:191) follows the `DR-08` pattern (:197): a recorded-run note ending "the row stays `Open` because … the independent review is still owed". -
PASS — CROSS-REFERENCE FORM. The PR body opens with
Related bitty-terminal/bitty#2921— the full cross-repo form, not a dangling bare#2921(body line 1); grep forcloses|fixes|resolvesover the body returns no matches — no Closes claim. -
PASS — GATES.
just checkin the lane worktree with the real bun first on PATH ($HOME/.local/share/bun/bin, bun1.4.5,bun --versionrc=0): rc=0. Per-gate: fmt-check ok; markdownlint0 issues in 137 files; links ok; docs-check-cross-repo PASS (1095 links, dead 0, 1 skipped); metadata, language, agents, hygiene all validated; svg skip (bitty-terminal docs submodule not initialized — a pre-existing checkout condition, not content); state snapshot validated; actionlint ok. No bun-shim rc=139 was encountered at any point, no gate was weakened, and the worktree was clean (git status --porcelainempty) with HEAD unchanged after the run.
Summary: 7 of 8 checks PASS — the records are honest about the divergence (source-confirmed down to the unlink identity check), structurally conformant to the corpus, flip nothing, and the gates are green. Check 5 FAILs on one element only: the discarded git-archive build (wrong embedded revision) is not disclosed anywhere in the PR. That is a one-paragraph disclosure fix in the records' Source identity sections plus a gates re-run; everything else in this lane is approve-ready.
VERDICT: CHANGES-REQUESTED
…build in both records Review finding on PR #526: the two records pinned the clean-clone build identity but did not disclose the discarded first build whose embedded revision read a walk-up repository (f0ee8c5). Both Source identity sections now carry the build-history disclosure; no cell, hash, or row came from the discarded tree. Record-dont-flip unchanged.
Xuepoo
left a comment
There was a problem hiding this comment.
Delta re-review of PR #526 ([CTX-0331] docs(security): record the V-26 replaced-inode and symlink tamper variants and the AC-022 live ctl cells) — fix round at head 698acf837009ae585379717d8018556a138dc901 (remote branch head, gh pr view --json headRefOid, and the lane worktree HEAD all agree; worktree clean). This is a delta re-review of the fix round against the original CHANGES-REQUESTED at 37ccab55e1902af5095225f487c696fb494ce644, whose single failing check was #5 (build identity: the discarded git-archive build with the wrong embedded revision was disclosed nowhere in the PR). Reviewer independent of both the original implementer and the fixer; the worktree was treated read-only — no merge, no branch update, no push.
-
PASS — FIX SCOPE.
git diff --name-status 37ccab55..698acf83touches exactly the two audit records and nothing else:docs/security/audits/bittyd-v26-variants-2026-11-22.mdanddocs/security/audits/bittyd-ac022-live-ctl-2026-11-22.md(both M). The entire fix-round diff is additive inside the two Source identity bullet lists — +7 lines at bittyd-v26-variants-2026-11-22.md:87-93 (hunk@@ -84,6 +84,13 @@, inside## Source identity:79) and +4 lines at bittyd-ac022-live-ctl-2026-11-22.md:86-89 (hunk@@ -83,6 +83,10 @@, inside## Source identity:78); zero deleted or rewritten lines, so no other cell, row, status, or status-adjacent text changed. record-dont-flip intact:git diff 37ccab55 698acf83overdocs/security/p0-acceptance-criteria.md,docs/security/evidence-matrix.md, anddocs/security/risk-register.mdis empty (byte-identical to the reviewed round), and the criteria+matrix diff vsorigin/mainis byte-identical between rounds (146 lines, sha256fdb6f5c7a98f5bbfba1c03f88ac39997f3c285f800679a7f00db6b8b2d454d3eat both heads), so the cells the original review verified keep those exact values:P0-AC-021staysPartially verified(p0-acceptance-criteria.md:807),P0-AC-022staysPartially verified(:808),DR-02staysOpen(risk-register.md:191, evidence-matrix.md:187). -
PASS — DISCLOSURE CONTENT. The v26 record's new bullet (bittyd-v26-variants-2026-11-22.md:87-93) states every fact the original check 5 demanded: the discarded export-based first build ("an earlier export-based source tree (a
git archivesnapshot of the same revision) was discarded", :87-88), the wrong embedded revision against the pin ("its embedded build revision read a walk-up repository and reportedf0ee8c5, not the pinned48f297d9…", :89-90 — the pinned SHA48f297d99aba65a96530f4ce028567e082a402d3is at :81), the catch timing ("discarded before any recorded cell ran", :88-89), and non-contamination ("Every observation below ran against the clean clone build described above; no cell, hash, or row in this record came from the discarded tree", :91-93). The ac022 record carries the companion pointer with the same facts (bittyd-ac022-live-ctl-2026-11-22.md:86-89): "The build history is the companion record's, including its disclosed and discarded export-based first build (embedded revisionf0ee8c5, caught before any recorded cell ran in either record); no cell in this record came from that discarded tree." Honest assessment: this fully resolves the original check-5 FAIL. The prescription was a build-history disclosure in the records' Source identity sections naming the discarded git-archive build and its wrong embedded revision — both Source identity sections now carry it (thearchivetoken the original review's grep counted at zero now sits at bittyd-v26-variants-2026-11-22.md:88, with the ac022 record pointing at the companion's full form), plus the gates re-run the same prescription asked for. -
PASS — NO NEW DEFECTS. No hardcoded host paths or usernames in the new text:
grep -nE 'fuyu|/home/|/mnt/data'over both records returns zero hits, and the new bullets name no path beyond the generic "read a walk-up repository". The voice matches the corpus records — a disclosure-first bullet in the Source identity list, backticked revisions, the operative fact bolded, no editorializing — the same register the 2026-11-21 frozen-vector record established for build-identity wrinkles. No claim the diff cannot support: the discard is attributed exactly to the embedded revision string ("the embedded revision string is how the discard was caught", bittyd-v26-variants-2026-11-22.md:90-91), never to a hash verification of the discarded tree — no hash of the discarded build is claimed anywhere — and "Every observation below ran against the clean clone build described above" stays consistent with the pre-existing clean-clone bullet at :81-86. -
PASS — GATES. Local:
just checkin the lane worktree with the real bun first on PATH ($HOME/.local/share/bun/bin, bun1.4.5): rc=0 — fmt-check ok (prettier 3.9.6), markdownlint 0 issues in 137 files, links ok, cross-repo PASS (144 resolved / 0 dead / 1 skipped), metadata, language, agents, hygiene validated, state snapshot validated, actionlint ok;svgskipped for the uninitialized bitty-terminal docs submodule — the same pre-existing checkout condition the original review recorded, not a content failure. Remote on the new head:gh pr checks 526— 4 pass / 0 fail / 0 pending (Docs quality ×2, Secret scan ×2), rc=0. Worktree HEAD unchanged and clean after the run.
The fix round did exactly what the original review prescribed and nothing more: the one failing check's disclosure landed in both Source identity sections with no collateral edit, no new defect, and the gates green locally and remotely.
VERDICT: APPROVE
Related bitty-terminal/bitty#2921
Evidence lane for the bittyd P0 acceptance criteria (CTX-0331): two dated
records at
bittyorigin/main48f297d99aba65a96530f4ce028567e082a402d3(detached clone, porcelain empty before and after every run; the shared
workspace checkout stayed read-only), docs and evidence only, no criterion
flipped.
What the records supply
bittyd V-26 Tamper Variants 2026-11-22
constructs the two same-uid variants of the
V-26endpoint-tamper exit thatevery prior record left unrun:
the socket path — daemon observed serving over the real endpoint first
(
daemon.negotiateok,daemon.statusrunning,tcp_listeners=0),then fail-closed exit
6at5.26 s, the single tamper linebittyd: endpoint tamper; no weaker transport is attemptedon stderr,stdout empty;
socket — same served-first observation, same exit
6at5.26 s, samesingle line;
variant: the socket path is not removed on either exit, because the
shutdown identity check refuses to unlink an object the daemon did not
bind — the planted artifact and the renamed socket file survive while
refusing connections;
this host has no passwordless
sudo; never attempted), andV-26'sharness row keeps its
requires-tamper-seamtyped skip.bittyd AC-022 Live Ctl Cells 2026-11-22
drives the terminal-instance verbs the 2026-11-16 record left unexercised,
live against a served
bitty --test-modeinstance over its socket:ctl terminal send— allowed under the CLI default grant, exit0, theuntrusted-output notice carried;
ctl terminal text— allowed, exit0, with the line sent by the previousverb observable in the read-back grid, so the allow rows are not vacuous;
ctl terminal spawndenied exit
7Denied/ScopeDeniednamingterminal.manage;ctl window newrecorded exactly as the headless servo answers it (theview.managegate passed, the request offered into the bounded lane, exit6Unavailable, nothing created) — the app-threaded allow cell stays atyped skip: it needs a windowed instance, the host compositor is out of
scope by the workspace GUI-testing ban, and no nested/virtual display
backend exists on the host;
terminal send/terminal textrideScopeSet::cli_default()and union-only elevation(
ipc_serve.rsConnectionServices::from_process_env), so no CLI-shapedlive deny arm exists for them at this revision.
Build identity
bittyat48f297d9, workspace version0.0.47,bitty-ipcpin18a1432.bitty#2605conformance driver green at the head in both recipeforms: plain
68 pass / 18 skip / 0 failof86, recipe (test-seams)70 pass / 16 skip / 0 fail,V-44served through the seam, parity48compared,
0divergences.bittyd(plain form, the binary every out-of-harness cell ran, hashverified before and after the campaign):
37734752bytes, SHA-2563ce1b84dadc5bd0f6951368e3f21ef3d00936b9a3875e48a9c11d994afc2ca6a;bittyd 0.0.47 (service API 1.5).bittyd(test-seams recipe build, test-only):37780960bytes, SHA-256802b9dbd0224fa5839ffe992f6cd9028da643b4059e43cf00ba514d65f0fbfd3.bittyterminal binary:612811784bytes, SHA-25661572b6aa0942d41b9f4e4c62c56251d2938a58fde490b8b9bca2bf714b05c50;bitty 0.0.47 (dev 48f297d9).Cells moved (record-dont-flip; no status changed)
p0-acceptance-criteria.md:P0-AC-021evidence + residual cells (the twoconstructed variants added; the owner-change variant kept),
P0-AC-022evidence + residual cells (the live send/text verbs added; the
app-threaded window-new cell kept as a typed skip), and the campaign-status
introduction.
evidence-matrix.md: a new2026-11-22 V-26 tamper-variant and AC-022 live-ctl campaignsubsection; theDR-02intake note; theP0-AC-021residual cell of the 2026-11-21 campaign table; the
P0-AC-022residualcell of the 2026-11-16 campaign table; the
P0-AC-022residual-cellsbullet.
risk-register.md: theDR-02row gains the recorded-run note (modevariant at
0bdb6d1c, replaced-inode + symlink at48f297d9) and keepsOpen, mirroring the paragraph the 2026-11-21 record added toDR-08.Every
Statecolumn is unchanged:R-011andDR-02stayOpen,P0-AC-021/P0-AC-022stay Partially verified, nothing is marked Verified,and the independent review stays owed.
Process notes
by their own exit
6, the test-mode instance by a signal to its recordedpid (the repo fixture's own teardown pattern); the owner's live daemon row
was listed before and after each campaign, unchanged; no pattern kills,
no
sudo, no TCP, no display server.just checkis green (prettier, markdownlint, language, agents, hygiene,state, actionlint). Prettier realigned the existing table rows around the
edited cells — the re-padding is the gate's own formatting, not a rewrite.