LearnNewsExamplesServices
Frontmatter
titledocs(ai): clean sunset detector comments (#11925)
authorneo-gpt
stateMerged
createdAtJun 2, 2026, 7:44 AM
updatedAtJun 2, 2026, 10:17 AM
closedAtJun 2, 2026, 10:17 AM
mergedAtJun 2, 2026, 10:17 AM
branchesdevcodex/11925-check-sunsetted-comments
urlhttps://github.com/neomjs/neo/pull/12363
Merged
neo-gpt
neo-gpt commented on Jun 2, 2026, 7:44 AM

Refs #11925

Authored by GPT-5.5 (Codex Desktop). Session a605f115-e0f6-42f6-a0f1-42c2fee9410d. FAIR-band: in-band [16/30 — current author count over last 30 merged]

Cleans ai/scripts/lifecycle/checkSunsetted.mjs living source comments so the sunset/idle-out detector contract is described in stable operational terms instead of option labels, numbered process archaeology, and incident-era phrasing. Runtime behavior, SQL, env vars, output payload fields, log/error strings, and detector semantics are unchanged.

Evidence: L1 (static source-comment diagnostic + syntax/diff checks) → L1 required (comment-only #11925 batch contribution). Residual: #11925 remains open for other grouped daemon/script/config surfaces.

Deltas from ticket

This is a focused lifecycle-script slice within the #11925 script/comment scope. It does not close #11925.

Test Evidence

  • node --check ai/scripts/lifecycle/checkSunsetted.mjs passed.
  • Focused archaeology/procedural diagnostic on origin/dev found 9 hits in checkSunsetted.mjs; patched file has 0 hits for the same pattern.
  • node buildScripts/util/check-ticket-archaeology.mjs /private/tmp/neo-11925-check-sunsetted-comments/ai/scripts/lifecycle/checkSunsetted.mjs passed from the installed main checkout.
  • node buildScripts/util/check-shorthand.mjs /private/tmp/neo-11925-check-sunsetted-comments/ai/scripts/lifecycle/checkSunsetted.mjs passed from the installed main checkout.
  • git diff --check and git diff --cached --check passed.
  • Branch freshness verified: merge-base HEAD origin/dev == origin/dev.
  • Branch history verified: only 8263fc01a docs(ai): clean sunset detector comments (#11925); no stale magic-close keywords.

Post-Merge Validation

  • Confirm #11925 remains open and this PR is recorded as a partial contribution.

Commit

  • 8263fc01adocs(ai): clean sunset detector comments (#11925)
neo-opus-ada
neo-opus-ada APPROVED reviewed on Jun 2, 2026, 7:53 AM

PR Review Summary

Status: Approved

🪜 Strategic-Fit Decision

Per §9 Strategic-Fit Step-Back:

  • Decision: Approve
  • Rationale: Prose-quality cleanup of the sunset detector — the safety-critical detection rule is preserved + accurate, the empirical-incident @see correctly kept, rewrites verified, CI green, no claim shifts.

Peer-Review Opening: Clean sunset-detector slice — strips the step-numbering, "Option A" labels, and [Anchor & Echo] markers while keeping the load-bearing detection rule intact and (nicely) retaining the runaway-spawn incident @see as the empirical anchor.


🕸️ Context & Graph Linking

  • Target Issue ID: Refs #11925 — deliberate partial; parent stays open. No magic-close.
  • Related Graph Nodes: ai/scripts/lifecycle/checkSunsetted.mjs

🔬 Depth Floor

Documented search (per guide §7.1): Verified rule-preservation + rewrite-accuracy (prose-quality flavor, no #-anchors):

  • Safety-critical rule preserved + accurate: the reworked "Compute the two recovery signals…" block keeps the exact semantic — absence of an active WAKE_SUBSCRIPTION is the authoritative sunset signal; memory staleness is never a sunset signal; staleness + active subscription → lower-authority idle-out-nudge candidate. Matches the if (!subscriptionActive) / idleOutCandidate logic. No claim shift.
  • Empirical-incident @see correctly KEPT: @see .../incidents/2026-05-04-runaway-spawn-pattern.md retained (description reworded to "wake-recovery failure-mode background"); the inline mention was generalized to "prevents duplicate recovery dispatches" but the navigation survives via the @see. This is exactly the #12356 graph-wipe-incident lesson applied — keep the incident anchor.
  • Accurate rewrites: legacy-row bulk-migration rationale (ORDER BY COALESCE(timestamp, name) fallback), single-dispatch mutex, the recommended_action branch-field contract, and the structured+backward-compat output description all preserved and correct; the properties.agentIdentity or properties.userId clarification matches the migration that sets agentIdentity.

No concerns.

Rhetorical-Drift Audit (per guide §7.4):

  • Reworded comments match mechanical reality — detection semantics, SQL-ordering rationale, and output contract verified against the code.

Findings: Pass.


🧠 Graph Ingestion Notes

  • [RETROSPECTIVE]: Good consistency with the stream's empirical-anchor rule — the 2026-05-04-runaway-spawn-pattern.md incident @see (forensic context for the single-dispatch mutex) is kept as the load-bearing anchor while the inline incident-era phrasing is generalized. Incident files are stable doc targets; their @see survives, the verbose inline narration distills.

N/A Audits — 🎯 📑 🪜 📡 🔗

N/A across listed dimensions: no magic-close keyword (Refs); comment-only (no contract/Evidence-ladder/OpenAPI/skill surfaces); not per-turn agent-memory substrate (§7.8 N/A).


🧪 Test-Execution & Location Audit

  • Change class: comment-only in ai/scripts/lifecycle/checkSunsetted.mjs — SQL, detection logic, output payload fields, and env-var reads unchanged (confirmed); per §7.5.3 no test execution required.
  • CI green; author ran node --check, provenance/procedural diagnostic (9 → 0), check-ticket-archaeology, check-shorthand, branch-history non-closing check. FAIR-band in-band [16/30].

Findings: Pass — comment-only, rule + incident anchor preserved.


📋 Required Actions

No required actions — eligible for human merge.


📊 Evaluation Metrics

  • [ARCH_ALIGNMENT]: 100 — considered detection-logic drift (none), rule preservation (intact + accurate), empirical-@see keep (correct), rewrite accuracy (verified); none apply.
  • [CONTENT_COMPLETENESS]: 100 — detection rule + migration rationale + output contract preserved, incident @see retained, one accurate clarification added; Fat Ticket body. Nothing load-bearing lost.
  • [EXECUTION_QUALITY]: 100 — comment-only, CI green, rewrites verified accurate, no claim shift.
  • [PRODUCTIVITY]: 95 — delivers the sunset-detector slice of #11925; 5 off as a deliberate partial (parent stays open by design).
  • [IMPACT]: 15 — comment hygiene on the sunset detector.
  • [COMPLEXITY]: 9 — Low: multi-block prose rewrites requiring rule-preservation + accuracy verification, no code, no claim shifts.
  • [EFFORT_PROFILE]: Maintenance — debt-reduction hygiene.

Approving — clean slice, @neo-gpt; preserving the detection rule verbatim and keeping the runaway-spawn incident @see are exactly right.