Skip to content

refactor: isolate monitor receipts and expand fuzz coverage - #149

Merged
trvon merged 3 commits into
fix/monitor-attachment-racesfrom
hardening/monitor-receipts
Oct 14, 2026
Merged

trvon merged 3 commits into
fix/monitor-attachment-racesfrom
hardening/monitor-receipts

Conversation

@trvon

@trvon trvon commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Stack

#147 → #148 → #149 → #150. Each child targets the preceding branch; #147 targets master.

Scope

Stack 3/4. Base: fix/monitor-attachment-races. Isolates internal callback receipts and expands generic monitor coverage.

  • MonitorManager.runCallbacks supplies a fresh deep snapshot to each consumer.
  • Generated runtime and inactivity models check terminal tuples, callback eligibility, finished payloads, output bounds, batching, exit grace, cancellation, pruning, and shutdown.
  • Native POSIX shell cases use owned gate barriers and a work file to distinguish output markers, physical exit, fixture-body execution, and authoritative monitor outcomes.
  • Steering fixtures use memory storage rather than consume unrelated persisted-session recovery notices.

Evidence and classification

Internal consumer-isolation hardening: unchanged-source seed 130363 failed at run 6 and shrank to a terminal callback mutation followed by timeout stop. Replay path: 5:4:4:4:7:7:7:7:7:7:7. The reducer guard remained correct; a mutable callback argument bypassed it. The same minimum and nested/zero-forgery expectations pass after repair. Four passive controls remain green. The minimized replay executed 59 checks, not the requested 1,000.

Three 1,000-run generated campaigns pass: 4,779 lifecycle actions, 4,779 consumer actions, and 4,844 inactivity actions. These overlap; 14,402 is an action-execution count, not unique scenario coverage. Defaults: 100 runs; maximum: 1,000; up to 40 actions.

Native seed 155921: 64 executions, 24 raw exit-zero/no-gate-start witnesses, no fixture-body execution in those witnesses. Their physical outcomes include zero, 143, and SIGTERM. Monitor metadata stays stopped/manual or stopped/timeout, with no successful done event. This is producer-pattern compatibility, not attribution of the original shell producer or a monitor product defect. Default native runs: 8; maximum: 64.

The harness coupling was reproduced with a test-owned foreign event store. Isolation passes all five unchanged assertions and preserves primary/previous snapshot hashes. No real session files were deleted or product recovery behavior changed.

Limits

get() remains mutable internal access. This does not promise public API immutability or isolate reentrant get mutations. Controlled-child models exceed ordinary process ordering; native checks are POSIX-only and the local observations are macOS. Windows-native checks are unavailable, not passes. Cross-monitor behavior, clock skew, independent surviving descendants, original Pi UI/crash reachability, and original producer attribution remain unproved.

Fixture cleanup retains the primary trace and cleanup failures and attempts every cleanup job. Reports retain successful observations and the final shrunk failure trace, not every failed attempt.

Validation

Fresh serialized gate at this exact tip: 80 files / 1,261 tests; 11 property-suite files / 30 overlapping tests. Coverage: 90.66% statements, 85.21% branches, 96.44% functions, 95.28% lines.

All commands below exit zero. Lint has two established warnings. Package smoke checks 124 files and public types; audit reports zero vulnerabilities.

npm run lint
npm run typecheck
npm test
npm run test:property
npm run test:coverage
npm run build
npm run test:package
npm audit --audit-level=moderate
git diff --check

The first four-tip concurrent run also hit a backlog filter-supersession assertion. The unchanged index/lifetime/store focus passes 98 tests; the serialized full gate and coverage run pass. The transient is disclosed, not attributed to a fixed product defect.

Commits

  • 83ca1bc — callback receipt snapshots and generated models.
  • 6fce3cf — steering fixture storage isolation.
  • 83d6f1d — native producer-pattern corpus.

Signed commits. Dependencies and product version unchanged. External evidence and .vitest/ are excluded.

trvon added 3 commits October 13, 2026 17:25
Generate bounded lifecycle and inactivity sequences, compare complete terminal outcomes, and isolate each callback with a fresh deep snapshot. Retain the seeded consumer-alias counterexample and passive controls; this is internal hardening, not attribution of the reported gate marker.
Notification fixtures must not consume recovery notices from ambient persisted sessions. Force memory storage and restore environment overrides without changing any steering assertion or product behavior.
Use real POSIX children and owned gate barriers to separate shell EXIT markers, physical exit, fixture-body effects, and authoritative monitor receipts. Bound the generated corpus and retain a pre-gate zero-marker witness plus normal and cleanup-evidence controls; do not attribute the original producer.
@trvon
trvon added this pull request to stack #151 October 14, 2026 04:48
@trvon
trvon merged commit 85a9465 into master Oct 14, 2026
5 checks passed
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