Repository navigation
Description
Sage task T25
Parent: #88. Prerequisite for the required checks on Codex diagnostic work #274 and #276.
Problem
Real live-update watcher cases fail on this Mac while the same diagnostic branches pass Linux CI. Earlier full local tests reported1756tests/1751pass/5fail, all unchanged board watcher cases. A separate unchanged-file Node24.21.0 comparison reported20tests/12pass/8fail. A runtime-version switch alone did not fix the observed failure. The cause remains unproved.
The owner approved G3 on2026-10-19: repair only this watcher prerequisite. Board feature work in #100 stays deferred.
Scope
- Diagnose notification delivery, callback filtering, snapshot refresh and SSE observation through actual filesystem changes.
- Distinguish an instrumented observation from an unchanged runtime and record its limits.
- Repair the demonstrated cause in packages/sage-board/server.mjs or its narrowly related test setup.
- Preserve authentication, path/symlink scope, stale snapshots, reconnect, missing/replaced roots and error recovery.
- Keep event-driven behavior. Do not add polling, loosen assertions, increase deadlines or change global machine/runtime settings as an unreviewed workaround.
- No new board screens, controls or task features. Do not touch active Claude-owned changes.
Acceptance
- Retain a reproducible distinguishing experiment for the actual cause.
- Add meaningful deterministic regression coverage where needed, with baseline or mutation proof that excludes setup failures.
- Pass the existing real filesystem/HTTP/SSE watcher checks with fake process commands first on PATH. No retries until passing or tight performance bounds.
- Run build, check and the full repository tests; retain counts and failures.
- Complete independent code review and QA on the final commit. Add security review if the fix changes a trust boundary.
- Preserve all earlier failed evidence; green CI alone does not explain the local failure.
Branch: codex/t25-watcher-prerequisite. Current investigation starts from main36b83e79fcac42bb8cedfc9d0243788f6ad48cd0. No implementation or repair is claimed yet.
Bounded investigation result
On main36b83e7, the unchanged board tests with external tracing report20tests/12pass/8fail. Tracing can affect timing. The trace records40watch registrations and40closes,159writes and4renames, but0delivered native callbacks; its one error comes from a test's explicit injection.
Independent stable directory fs.watch controls, without board/test code or tracing, observed0callbacks/errors under Node26.8.2 and24.21.0 across temporary, canonical and workspace roots. A standalone C CoreServices FSEvents stream also observed0callbacks despite successful start and file writes. A separate native kqueue directory control observed NOTE_WRITE. These are finite observations, not proof that delivery can never occur. Regular-file fs.watch was not tested.
The evidence places the observed failure before board callback filtering/SSE delivery. It does not establish the underlying host/launcher/FSEvents cause. No repository change, polling workaround, deadline increase, dependency or host setting change is justified yet. Build320/check pass; the focused watcher suite remains failed, and no full-suite repair is claimed. All owned controls, watchers and temporary fixtures are terminal/cleaned.
T25 is held pending an unchanged minimal control comparison from an owner launcher. The failed prerequisite remains open and does not disappear because Linux CI passes. #100 board features remain deferred.
Activity
erickb336 commentedon Oct 20, 2026
Regular-file control
One owned, disposable control run on Node v26.8.2 / libuv 1.53.0 returned exit 0.
Two watchers observed three write operations: append, overwrite and atomic replacement. The regular-file watcher received two change events and one rename event. The directory watcher received zero events. No errors occurred. Both watcher handles closed and the disposable root was removed.
This is a finite observation, not a latency guarantee. It confirms that this environment can deliver Node file events while directory events remain absent. It does not establish the underlying host cause.
The board currently watches directory plans. Replacing them with file watches alone would miss creation discovery and requires correct reattachment after atomic replacement. Therefore this control does not justify an incomplete backend change or a passing board-check claim. The external owner Terminal comparison and an event-only repair remain unresolved.
No source, dependency, runtime setting or assertion changed. No background work remains from this control.
erickb336 commentedon Oct 20, 2026
New evidence: the unchanged directory-event control now receives callbacks for root and child writes. Six watchers and six create-and-rename operations completed with no error events, all handles closed, and the temporary root was removed.
This direct control followed a full-suite 1894/1894 pass on the earlier T28 candidate, which justified a fresh observation. No watcher source, settings, deadline or assertion was changed to obtain it. Earlier failures remain preserved.
The blocker no longer reproduces in this control. The cause of the environmental change is unknown; this is not a permanent-fix or root-cause claim. Final repaired-head checks and independent review remain pending.
erickb336 commentedon Oct 20, 2026
The unchanged pre-investigation baseline now passes its complete board-server suite: 20 tests,20pass,0fail,0cancelled,0skipped, with observed terminal exit0. Tests include missing-root discovery, root replacement, watcher error recovery, parent renames, and shutdown.
This confirms the newly observed raw directory callbacks at the actual board boundary. No watcher code, deadlines, assertions or installed settings changed. The previous no-callback prerequisite failure no longer reproduces in these checks. Its cause and permanence remain unknown; historical failures remain preserved.
This is a prerequisite recovery observation, not a claimed source fix or a substitute for final-head T28 checks.
erickb336 commentedon Oct 21, 2026
Current verification update: PR #294 head cac726e completed build/check and all 1,956 local tests with fake ps/pgrep/kill first on PATH (zero failures, cancellations or skips). Recent preceding main work also passed full local suites. No watcher source or assertion changed in #294.
The historical failure remains unexplained, and these passing runs do not prove a permanent watcher fix. The old statement that focused watcher checks remain failed is historical, not a current failure claim. This issue remains open for the distinguishing cause/repair evidence in its acceptance criteria. It is not currently blocking #294's local required checks. No polling, relaxed deadline, dependency or host setting change was introduced. Claude-active board feature work remains separate.