Skip to content

Follow-up: deferred review findings from PR #502 #511

Description

@philcunliffe

Context

Follow-up from TRIAGE on PR #502 (fix/issue-421, head 2487861d346566da1b79d45838d92833f6fb6ff7).

The two-round review fix-loop (comments on PR #502 marked
<!-- neutral-review: 7d1b111...findings --> and
<!-- neutral-review: be9ce7f...findings -->) raised F1-F5 across both
rounds (unsanitized/unbounded client-supplied labels reaching status.json
and the terminal, a partial sanitizer missing bidi-override and zero-width
characters, a missing test pinning the eviction cap, a wrong threat-model
note in docs, an uncapped read-side entry count, and a hung/throwing plugin
status() probe that could freeze status.json and make hyp daemon stop
unstoppable). All were fixed by the reviewer's own fix-forward commits
(be9ce7f, 2487861) within the PR itself.

TRIAGE independently re-verified this rather than trusting the review
comments: read src/core/util/json_util.js (sanitizeLabel strips C0/C1,
bidi overrides/isolates, and zero-width/default-ignorable characters, clamps
to 120 chars without a stranded surrogate), src/core/daemon/status.js
(MAX_RECENT_ENTRYPOINTS = 32 applied on the read side after sort), and
src/core/daemon/runtime.js (probeSourceDetails under a 5s timeout,
in-flight-skip, transition-only daemon.source_status_failed/_recovered
logging). Ran the full npm test (3055/3055 non-pre-existing tests pass,
identical 8 pre-existing test/core/leave-command.test.js failures),
npm run typecheck (clean), and npm run smoke -- gateway_codex_capture
(ok) against a fresh worktree at head 2487861. The dedicated hang-probe
test (test/core/daemon-source-details-refresh.test.js, "a source whose
status() never settles cannot freeze the status file or the shutdown")
passes and is non-vacuous: it stages a real hanging plugin, asserts
status.json's mtime keeps advancing, that stop() completes, and that the
failure is logged at least once and at most 4 times.

Conclusion: no TRUE BLOCKER is open at head 2487861. This PR is safe
to ship as-is.

Deferred (non-blocking)

Author sign-off on two constants chosen unilaterally during round-2
fix-forward.
Quoting the round-2 review comment (be9ce7f review,
posted 2026-07-31T03:42:34Z on PR #502):

The 5s probe timeout and the transition-only log shape are my calls, made
because I am the last round and the alternative was handing triage an
unstoppable-daemon vector. Both are documented in LLP 0164. If you prefer
a different bound or a different event shape, they are one constant and
one function.

Concretely:

  • SOURCE_STATUS_TIMEOUT_MS = 5000 in src/core/daemon/runtime.js (the
    ceiling a plugin's status() probe gets before the tick gives up on it).
  • The log event names daemon.source_status_failed /
    daemon.source_status_recovered, also in src/core/daemon/runtime.js,
    and their transition-only (not per-tick) emission policy.

Both are safe, tested, and documented in LLP 0164, but the PR author never
explicitly confirmed these specific values/shapes — they were introduced by
the reviewer while fixing the PR forward in the final round rather than by
the author. Worth a quick author glance to confirm the timeout value and
log-event naming match what they'd have chosen, or adjust if not. Not
blocking: nothing about shipping the current values is unsafe.

Backlink

PR: #502

Metadata

Metadata

Assignees

No one assigned

    Labels

    neutral:fixDelegate this issue to neutral for an autonomous fix attempt (reproduce -> fix -> PR)neutral:stuckneutral attempted this but cannot complete it autonomously — needs a human

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions