Skip to content

v1.88.1.0 fix: harden credential boundaries and owned state - #2942

Merged
garrytan merged 15 commits into
mainfrom
fix/severity-first-seven-fixes
Sep 23, 2026
Merged

garrytan merged 15 commits into
mainfrom
fix/severity-first-seven-fixes

Conversation

@garrytan

@garrytan garrytan commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Seven bounded credential, process-lifecycle, and user-state repairs for 1.88.1.0 (package.json: 1.88.1). Published head: dc1614d4d1c8b8e9767647990ee690179e14c92b, against 636175d.

The final review's Unicode redaction blocker is repaired and has passing before/after regressions, including the actual compiled CSO reader and installed pre-push hook. Fresh local acceptance and all required CI checks pass on this head: 55 successful, 0 failed, 0 pending, 2 workflow skips. Earlier green CI at babc610 remains historical evidence only. The maintainer merged this PR on 2026-09-23 as b9706f3; its tree exactly matches the accepted head. No deployment was performed by this thread.

Credential boundaries

  • Mask the exact original spans detected through normalization, preserving neighboring text, repeated values, overlap, and marker-only/oversize refusal. Map each normalized UTF-16 unit to its original start and end so supplementary NFKC expansion cannot displace masking or silently skip an EOF finding. Compiled CSO reads retain sanitized readable source while withholding unmaskable payloads.
  • Bind pre-push ranges to the actual destination name and effective URL, using fully qualified tracking refs. Handle missing advertised objects and SHA-256 empty trees conservatively, preserve normalized context across bounded windows, and admit each finding only in its owning core without invented anchors or duplicates. Installed-hook regressions cover the supplementary-expansion seam that previously allowed a detected HIGH credential through. Unscannable lines/context still fail closed at the existing 1 MiB cap.
  • Exclude credential-shaped variables from broad CI-prefix admission into hermetic children, while preserving CI metadata, explicitly admitted provider authentication, and documented runner overrides. Exercise the actual session launcher rather than only a helper mock.

Ownership and user state

  • Bind terminal agents to the persistent browser daemon and its process generation. Require confirmed exit before replacement, retain uncertain children, bound failed respawns, and serialize publication/shutdown so an older generation cannot remove its successor's state. Native exit observation recognizes zombie/reaped processes without turning uncertain identity into permission to kill.
  • Preserve exact CSO filesystem identities and nanosecond timestamps through lease acquisition, comparison, recovery, and release. Keep adjacent high IDs distinct and refuse ambiguous legacy state. Native NTFS tests exercise the compiled helper's repeated lease lifecycle.
  • Resolve the selected settings symlink target consistently for locking, mutation, backup, and rollback, preserving links, modes, and unrelated settings. Refuse changed or invalid targets; permission-denied resolution retains exit 3 and unwinds temporary-file cleanup.
  • Refresh managed artifact allowlist rules while preserving the user suffix byte-for-byte, including comments and a missing final newline. Refuse ambiguous markers or failed assembly instead of replacing user data.

Attribution

These are maintainer integrations, not wholesale adoption of the contributor branches. The four source PRs were subsequently closed as superseded, with individualized thanks and immutable merge/implementation citations:

Area Contributor input Integration
Exact redaction spans @aclansley, #2929 Diagnosis and anchored-span approach; exact-original-span implementation and normalization/fail-closed controls
Destination-aware pre-push scans @lubosxyz, #2935 Diagnostic source; independent implementation, not cherry-picked
Hermetic credentials @ntdatt812, #2636 Adapted credential-suffix screening at the shared environment boundary
Agent lifecycle @saltydoctor, #2931 Ownership and confirmed-exit design input; no broad process sweep

Related: #2930, #2912, #2927, #2894, #2830, #2907. Post-merge dispositions: #2930, #2927, #2830, and #2907 are completed; #2912 and #2894 remain open for their unaddressed scope. Contributor PRs #2929, #2935, #2636, and #2931 are closed as superseded, not merged. See the post-merge follow-up comment for individual citations.

Test coverage and local acceptance

Fresh, isolated acceptance at dc1614d: bun run build, generated-output cleanliness, then xvfb-run -a bun run test through the strict shard runner. 25,090 passed, 61 skipped, 0 failed, 0 module/unhandled errors; 192,185 assertions across 1,000 files. Both shard, inner, Docker, container, and evidence-copy exits were verified as zero. Fresh build/test receipts bind to the exact frozen tree.

The no-network acceptance container uses the pinned CI image with the previously verified local-only Python-venv prerequisite layer: Bun 1.4.0, Node 22.20.0, Python 3.12.3, Xvfb, lock-matched dependencies, isolated Git fixtures, and no model credentials. The build and suite completed in about 14 minutes.

F1 normalization → original spans → CSO/CLI/telemetry: exact-output and refusal controls
F2 destination → scan windows → real installed hook: destination, seam, and no-remote-mutation controls
F3 environment policy → actual child launcher: credential denial and intentional admissions
F4 owner generation → replacement/publication/shutdown: process, uncertainty, and takeover controls
F5 exact filesystem IDs → lease lifecycle/recovery: portable boundaries and native NTFS gate
F6 canonical settings target → mutation/rollback: links, modes, races, and cleanup controls
F7 managed prefix + preserved suffix → atomic re-init: exact bytes and failure preservation

The Unicode repair added eight engine/CLI cases plus actual compiled-reader and installed-hook cases. They reproduce eight failures before repair and pass afterward; the BMP invariant covers all 65,536 input units. Focused and adjacent runs passed 429 tests before full acceptance. No existing assertion, timeout, detector threshold, or model budget was weakened.

Coverage percentage is unmeasured, not 100%. Four direct behavioral gaps remain disclosed: POSIX CLI startup-timeout cleanup, repeated failed-start watchdog cutoff, same-path external settings replacement, and defensive CSO uint64/metadata rejection boundaries. These are not demonstrated production defects; the watchdog cutoff remains a partial planned proof item.

Changed-text scanning reports 0 HIGH, 26 reviewed MEDIUM advisories, no oversize input; advisories are version/dead-PID/synthetic fixture data. Error-level ShellCheck, shell syntax, the exact CI-pinned actionlint container, diff hygiene, and online version-queue checks pass. Critical dependency audit checked 256 packages with no critical findings; three lower-severity advisories remain.

Performance comparison

Bun 1.4.0, hash-pinned baseline/repaired code, 48 adapter/correctness controls and 90 fresh-process timed samples across nine workloads. Median pre-push scan time rises 8.6% on 8 MiB clean text, 10.9% on 8 MiB with findings, and 20.1% on normalization-heavy text; those cases have matching findings. The extra work preserves neighboring normalized context.

Dense redaction with byte-identical output improves 1000.5 → 163.2 ms (6.1× faster); median whole-process peak RSS rises 84.3 → 93.1 MiB. Observed scan calls stay below 1 MiB. Separately, a boundary fixture improves from zero to 16 expected findings; that is corrected detection, not equivalent-work speedup. These synthetic shared-machine measurements are not production percentiles, a latency target, or scanner-only allocation measurements.

Pre-landing review

The final review found one P1 UTF-16 mapping defect and three stale documentation statements. All are repaired in dc1614d. A fresh full-branch native adversarial pass found no remaining concrete FIXABLE or INVESTIGATE production findings; unchanged-tree review receipts are current. Adversarial fixture review was summary-only; the parent inspected and executed the regression tests.

External Claude Code review was unavailable because its CLI was unauthenticated. No dual-model review is claimed. Greptile triage found no comments. No visual frontend change is included.

Required CI on dc1614d

  • Linux free-test shards and aggregate, generated-content, quality, workflow, version, and build gates.
  • Native macOS: 7 startup tests and 166 lifecycle/concurrent-shutdown/linked-settings tests passed, 0 failed.
  • Native Windows: 19 startup/NTFS high-ID lifecycle tests passed, 0 failed. Curated Windows passed across 652 files; Windows setup also passed. The quiet curation log does not retain separate pass/skip totals.
  • Existing CSO Docker gate: 5 passed, 2 skipped, 0 failed. The unselected staged-stack and Node-producer journeys receive no coverage credit.
  • Authenticated run 35816517616, attempt 1: all six slices and 36 planned shards reconciled successfully. Collectors record 85 executed + 14 exact-input reused = 99 passed, 0 failed, with 99 attempt records and $21.59 reported cost. Direct PTY outcomes are separately accounted by the shard reconciliation; the formerly provider-blocked plan-devex file passed in 136 seconds. No workflow retry was needed.

Selection remains 77 E2E case IDs and 25 judge IDs in full-fallback mode. 119 behaviors remain scheduled/release coverage, not PR-pass credit. Fourteen eligible unchanged judge results were reused; 11 uncached judges ran under the maintainer's explicit approval. The entirely skipped routing (10 cases) and judge-recommendation (1 case) shards are periodic-tier placeholders, not gate passes. The two workflow-level skips are qualification/staging jobs. Local report-only reconciliation also passed, and CI merge commit 73a5eba3 has the exact same tree as dc1614d.

Plan completion and limits

All seven implementation areas, the Unicode review repair, documentation corrections, and the previously missing baseline-versus-head time/memory measurement are complete. Fresh local, native-platform, Docker and authenticated gates pass on the published head. The original separate-PR/local-eval arrangement was replaced by the approved single attributed PR and authenticated CI path. Plan audit: 41 DONE, 2 CHANGED, 1 PARTIAL, 0 NOT DONE, 0 UNVERIFIABLE. The repeated failed-start cutoff lacks direct runtime regression proof and remains explicitly partial; it is not claimed as covered by the larger suite totals.

Abandoned publication locks intentionally require manual owner verification/recovery. Windows terminal startup is still tracked in issue 2637: detachment, Node-shim forwarding, and connect-readiness need separate CLI-exit work and native proof. That issue was reopened after GitHub incorrectly treated the former negated closure wording as a closing reference. Exact filesystem identity is not Windows process-creation-time/PID-reuse protection. The reported thousands-of-orphans exhaustion scenario was not reproduced. Name-based environment screening and the documented noncooperating-settings-writer race retain their stated limits. The maintainer performed the merge; this thread subsequently reconciled the affected issues and contributor PRs. No deployment or shared Setup change was performed.

Documentation

docs/BROWSER_INTERNALS.md now describes locked, owner-checked, confirmed-exit cleanup, including absent/already-dead agents and retained uncertain state. TODOS.md distinguishes no-argv pre-push compatibility from installed-hook destination binding and records the now-tested large-diff slicing path. The release notes cover all seven repairs; version metadata remains 1.88.1.0.

Resolve the selected target for locking, mutation, backup, and rollback; refuse target changes and preserve private modes. Addresses #2830.
Inspired by #2929's anchored-span diagnosis; independently implemented using normalization offsets. Addresses #2930 and the relocation portion of #2912 without changing detection sensitivity.
Adapts the credential-suffix screen proposed in #2636, with real launched-child regression coverage and deliberate provider-auth exceptions.
Preserve the exact user-owned suffix and publish only a successfully assembled replacement. Independently implements the repair reported in #2907.
Preserve 64-bit device/inode identity and nanosecond race checks. Add native NTFS lifecycle coverage for #2927; retain ambiguous legacy-state refusal without claiming Windows PID-reuse recovery is resolved.
…text

Uses #2935 (bd07318) as source evidence for push-target range and slice-overlap defects. Independently implemented; no cherry-pick or release metadata adoption.
Uses #2931 by Chris Hutton / Claude Fable 5.1 as attributed design input; independently implemented without broad sweeps or copied code. Keep uncertain children and locks rather than deleting foreign state.
@trunk-io

trunk-io Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

E2E Evals: ✅ PASS

99/99 recorded final results passed | 85 executed, 14 reused | $21.59 total cost | reconcile exit: 0

Profile: pr / full-fallback; selected behaviors: 77, judges: 25. Deferred to scheduled/release coverage: 119 behaviors and 0 changed prompt files. Deferred checks did not run and receive no PR-pass credit.

Shard Result Executed Reused Status Cost
e2e-browse/skill-e2e-bws 7/7 7 0 ✅ $0.57
e2e/skill-e2e-coverage-audit 2/2 2 0 ✅ $0.66
e2e-cso/skill-e2e-cso 1/1 1 0 ✅ $0.82
e2e-deploy/skill-e2e-deploy 6/6 6 0 ✅ $3.07
e2e-design/skill-e2e-design 3/3 3 0 ✅ $0.86
e2e-docsync-spawned/skill-e2e-docsync-spawned 1/1 1 0 ✅ $0.2
e2e-hermetic/skill-e2e-hermetic-canary 2/2 2 0 ✅ $0.03
e2e-learnings/skill-e2e-learnings 1/1 1 0 ✅ $0.22
e2e-opus-47/skill-e2e-opus-47 6/6 6 0 ✅ $1.39
e2e-plan-tune-cathedral/skill-e2e-plan-tune-cathedral 5/5 5 0 ✅ $0
e2e-plan-tune/skill-e2e-plan-tune 1/1 1 0 ✅ $0.48
e2e/skill-e2e-plan 7/7 7 0 ✅ $2.51
e2e-qa-workflow/skill-e2e-qa-workflow 3/3 3 0 ✅ $2.11
e2e-retro/skill-e2e-retro 1/1 1 0 ✅ $0.54
e2e-review-army/skill-e2e-review-army 5/5 5 0 ✅ $1.66
e2e-review-attribution/skill-e2e-review-attribution 3/3 3 0 ✅ $0.49
e2e-review/skill-e2e-review 2/2 2 0 ✅ $0.52
e2e-session-intelligence/skill-e2e-session-intelligence 4/4 4 0 ✅ $0.54
e2e-ship-docsync/skill-e2e-ship-docsync 1/1 1 0 ✅ $0.56
e2e-skillify/skill-e2e-skillify 3/3 3 0 ✅ $1.73
e2e-third-party-actions/skill-e2e-third-party-actions 5/5 5 0 ✅ $0.51
e2e-triage/skill-e2e-triage 1/1 1 0 ✅ $0.36
e2e/skill-e2e-workflow 4/4 4 0 ✅ $1.54
llm-judge/skill-llm-eval 25/25 11 14 ✅ $0.22
Fail-closed reconciliation
[test:paid] report: 6/6 slices, 36 planned shards, tier=gate
[test:paid] coverage: profile=pr mode=full-fallback; selected E2E=77, judges=25
[test:paid] deferred: 119 broad behaviors, 0 changed prompts without quick live coverage; these are not PR passes
  slice 1  passed            225s  test/skill-e2e-plan-mode-no-op.test.ts
  slice 1  passed             61s  test/skill-e2e-plan-tune.test.ts
  slice 1  passed             58s  test/skill-e2e-session-intelligence.test.ts
  slice 1  passed              0s  test/skill-llm-eval-spec.test.ts
  slice 2  passed             20s  test/skill-e2e-opus-47.test.ts
  slice 2  passed            300s  test/skill-e2e-plan.test.ts
  slice 2  passed            371s  test/skill-e2e-qa-workflow.test.ts
  slice 2  passed            136s  test/skill-e2e-ship-docsync.test.ts
  slice 2  passed              0s  test/skill-routing-e2e.test.ts
  slice 3  passed             32s  test/skill-e2e-learnings.test.ts
  slice 3  passed            136s  test/skill-e2e-plan-devex-plan-mode.test.ts
  slice 3  passed             93s  test/skill-e2e-review-attribution.test.ts
  slice 3  passed             42s  test/skill-e2e-triage.test.ts
  slice 3  passed             80s  test/skill-llm-eval.test.ts
  slice 4  passed            101s  test/skill-e2e-bws.test.ts
  slice 4  passed            499s  test/skill-e2e-deploy.test.ts
  slice 4  passed             42s  test/skill-e2e-docsync-spawned.test.ts
  slice 4  passed            214s  test/skill-e2e-plan-ceo-finding-floor.test.ts
  slice 4  passed             33s  test/skill-e2e-plan-ceo-plan-mode.test.ts
  slice 4  passed            133s  test/skill-e2e-retro.test.ts
  slice 4  passed            234s  test/skill-e2e-skillify.test.ts
  slice 5  passed             47s  test/skill-e2e-coverage-audit.test.ts
  slice 5  passed            150s  test/skill-e2e-design.test.ts
  slice 5  passed              6s  test/skill-e2e-hermetic-canary.test.ts
  slice 5  passed            479s  test/skill-e2e-plan-design-with-ui.test.ts
  slice 5  passed            161s  test/skill-e2e-plan-devex-finding-floor.test.ts
  slice 5  passed            339s  test/skill-e2e-review-army.test.ts
  slice 5  passed             79s  test/skill-e2e-third-party-actions.test.ts
  slice 6  passed              0s  test/llm-judge-recommendation.test.ts
  slice 6  passed             50s  test/skill-e2e-ask-user-question-format-compliance.test.ts
  slice 6  passed            204s  test/skill-e2e-cso.test.ts
  slice 6  passed             43s  test/skill-e2e-diagram.test.ts
  slice 6  passed             78s  test/skill-e2e-office-hours-auto-mode.test.ts
  slice 6  passed              0s  test/skill-e2e-plan-tune-cathedral.test.ts
  slice 6  passed            123s  test/skill-e2e-review.test.ts
  slice 6  passed            277s  test/skill-e2e-workflow.test.ts
[test:paid] collector final outcomes: 85 executed, 14 reused; 99 passed, 0 failed (99 attempt records from 25 collectors)
[test:paid] report: ⚠ 2 shard(s) passed with EVERY test skipped — they verified nothing:
  ⚠ test/skill-routing-e2e.test.ts (10 skipped — external service missing or tier mismatch)
  ⚠ test/llm-judge-recommendation.test.ts (1 skipped — external service missing or tier mismatch)
[test:paid] report: every planned shard accounted and passed

Sliced lane: declared PR profile or broad fallback via scripts/test-paid-shards.ts (planner → 6 executors → fail-closed report). Reused scores retain their original provenance and expiry.

@capy-ai
capy-ai Bot marked this pull request as ready for review September 23, 2026 04:21
@garrytan
garrytan merged commit b9706f3 into main Sep 23, 2026
59 checks passed
@capy-ai

capy-ai Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Post-merge issue and contributor follow-up

Verified the merge commit b9706f3 has exactly the accepted dc1614d tree. All eleven affected threads now have individualized thanks and immutable merge/implementation/regression citations; their comments and final states were read back from GitHub.

Contributor PRs closed as superseded, not represented as merged or wholesale adopted:

Source PR Preserved attribution and disposition
#2929 aclansley: anchored-span diagnosis and approach; maintainer exact-original-span implementation
#2935 lubosxyz: destination/range and proximity diagnostics; independent implementation, not cherry-picked
#2636 ntdatt812: adapted credential-suffix screening at the shared environment boundary
#2931 saltydoctor: ownership and confirmed-exit design; no broad process sweep

Issues closed as completed: #2930 (wrong-line masking), #2927 (NTFS identity precision), #2830 (settings symlinks), and #2907 (custom allowlist preservation).

Partial-scope issues intentionally remain open:

  • #2912: detector-expression false positives and manifest/snapshot limits are not solved by the relocation repair.
  • #2894: exact NTFS identity is repaired; Windows PID-reuse identity and the separate diagnostics/report/toolchain concerns remain.
  • #2637: reopened after unintended merge-time auto-closure. Owner wiring is repaired, but Windows detachment, Node-shim forwarding, and connect/CLI-exit readiness need separate native proof.

The PR description now reflects these dispositions and no longer contains the negated closing phrase that GitHub linked to issue 2637. No code, validation claims, branches, deployment, or contributor authorship were changed during this follow-up.

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