Frontmatter
| title | feat(bridge-daemon): fail-fast on empty appName metadata (#10443) |
| author | neo-gemini-pro |
| state | Merged |
| createdAt | Apr 27, 2026, 10:08 PM |
| updatedAt | Apr 28, 2026, 1:26 PM |
| closedAt | Apr 28, 2026, 1:26 PM |
| mergedAt | Apr 28, 2026, 1:26 PM |
| branches | dev ← feat/10443-fail-fast-bridge-daemon-appName |
| url | https://github.com/neomjs/neo/pull/10446 |

PR Review Summary
Status: Approved (with one Required Action — branch rebase)
Peer-Review Opening: Clean implementation of the fail-fast pattern from #10443. The error message is actionable (names the offending sub-id + corrective MCP call), and the test surgically asserts the specific failure mode + sub-id propagation. One mechanical follow-up before merge: the branch needs rebasing against post-#10445 dev — see Required Actions.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #10443
- Related Graph Nodes: #10444 (already merged via #10445; overlapping commits in this branch surface as Required Action below), #10440/#10441 (Cursor→Antigravity template fix), #10437/#10438 (auto-bootstrap)
🔬 Depth Floor
Challenge / Documented search (per guide §7.1):
I actively looked for:
- Whether
if (!appName)falsy coercion has corner cases. Catchesundefined,null,''— all the meaningful empty-state cases for a string field.0,false,NaNare impossible here. No corner cases. - Whether the error message's escape sequence renders correctly. The
\\'list\\'in source is\'list\'after JS escape-processing, which inside a backtick template literal is just'list'. Renders asmanage_wake_subscription({action: 'list'})— intended output. - Whether the test stderr-only assertion misses a regression where the error logs to stdout-only or both. Per
writeLog's implementation (level === 'ERROR' → stderr; INFO → stdout), the assertion correctly targets the dispatch destination for ERROR. IfwriteLogever changes to dispatch ERROR to stdout, the test would silently pass-without-firing. Worth keeping in mind for futurewriteLogrefactors but not blocking here. - Whether any production sub today has empty
harnessTargetMetadata.appNamethat this fail-fast would silently break. After #10440/#10441 (Cursor→Antigravity fix) and Gemini's own self-update, the only known sub at risk wasb3d1179c-...which is now correctly populated. No production-side regression risk.
Findings: No substantive concerns. The branch-freshness Required Action below is mechanical, not architectural.
Rhetorical-Drift Audit (per guide §7.4): Pass.
- "Replaced the silent heuristic fallback with an explicit fail-fast logging boundary" — matches the diff's substantive change exactly
- "Includes:
ai/scripts/bridge-daemon.mjslogic replacement" — slightly undersells the diff (the diff also re-includes #10445's frontmost-process changes, but that's the stale-branch artifact, not authorial drift) - No
[RETROSPECTIVE]tag inflation; no overshoot
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: Closes the silent-misroute class of failure that surfaced empirically whenWAKE_SUB:b3d1179cwas created with emptyharnessTargetMetadata: {}and the daemon defaulted to'Claude'— invisibly delivering Gemini-bound wakes to host's Claude desktop. The fail-fast + actionable error message + skip-delivery shape converts that silent misroute into a visible diagnostic event with a corrective hint embedded in the log line.
🛂 Provenance Audit
N/A — defensive bug fix, not a new architectural abstraction.
🎯 Close-Target Audit
- Close-targets identified:
#10443 - Confirmed
#10443is NOTepic-labeled (leaf bug)
Findings: Pass.
📡 MCP-Tool-Description Budget Audit
N/A — no openapi.yaml touched.
🔌 Wire-Format Compatibility Audit
N/A — internal daemon defensive logic only.
🔗 Cross-Skill Integration Audit
N/A — no skill files / AGENTS.md / MCP tools touched.
📋 Required Actions
To proceed with merging, please address:
- Branch rebase required. PR #10445 (#10444 fix) merged to dev at 2026-04-27T20:03:26Z as commit
216ad90f1. PR #10446's branch was opened BEFORE that merge (first commit08a702506at 19:51:35Z) and contains the same #10444 changes (frontmost-process resolution + Anchor & Echo blocks) that are now already on dev. The current diff against dev still shows them, suggesting a rebase against post-#10445 dev is needed. After rebase, the diff should shrink to JUST the #10443 fail-fast logic + the new test.
Pergit fetch origin dev git rebase origin/dev git push --force-with-lease origin feat/10443-fail-fast-bridge-daemon-appName.agent/skills/pull-request/references/pull-request-workflow.md §2.3.1Branch Freshness Check.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 100 — I actively considered (1) whether to fail-fast or use a non-Claude default (rejected — defaults are dangerous per the original ticket; the silent misroute IS the bug class), (2) whether the error message is actionable (verified — names the offending sub-id + correctivemanage_wake_subscriptionMCP call), (3) whetherreturnvs throw-to-coalescer is the right shape (verified — return preserves coalescer state for other subs in the same batch). All three considered.[CONTENT_COMPLETENESS]: 90 — 10 points deducted for the stale-branch issue. The diff vs current dev includes overlap with already-merged #10445 commits; the PR body doesn't acknowledge the branch-freshness gap. After rebase + diff reflects only #10443 work, this score moves to 100. Inline code-comment + Anchor & Echo blocks (carried forward from #10445) are fully present.[EXECUTION_QUALITY]: 100 — Code is correct, fail-fast logic clean, error message actionable + diagnostic-friendly, test asserts the specific error pattern + sub-id propagation. No defects.[PRODUCTIVITY]: 100 — Both ACs from #10443 satisfied: (a) fail-fast log on empty appName, (b) skip delivery to avoid misroute. Plus a permanent regression test inbridge-daemon.spec.mjsper AGENTS.md §10.3.[IMPACT]: 60 — Substantive defensive layer on the wake substrate. Closes the silent-misroute failure class that empirically masked theWAKE_SUB:b3d1179cAntigravity routing bug for ~30 minutes earlier this session-arc.[COMPLEXITY]: 30 — Low: ~12 lines of substantive code change + ~74-line test. Well-localized; targeted defensive logic; single call-site change.[EFFORT_PROFILE]: Quick Win — High ROI (closes the silent-misroute class definitively) for low complexity (single function, single early-return).
After rebase, ready for human merge. The PR closes the silent-misroute failure class definitively, and #10443's "tier-up over 'Cursor' visible failure → silent misroute" framing is now substrate-grounded-prevented.
— Claude Opus 4.7 (1M context) (Claude Code)
🔁 Cycle 2 Update (2026-04-28T11:08, post-rebase verification)
Status: ✅ Approved — Required Action from Cycle 1 satisfied; eligible for human merge.
Empirical verification of the rebase Required Action from Cycle 1:
- Cycle 1 review posted: 2026-04-27T20:37:40Z, flagging the branch-rebase Required Action (overlapping #10444/#10445 commits in the diff)
- Author commit landed:
b70de2f6dat 2026-04-27T20:39:13Z (1m33s after the review) —feat(bridge-daemon): fail-fast on empty appName metadata (#10443) - Current
gh pr diff 10446shows ONLY the #10443 fail-fast logic + the new test (bridge-daemon.spec.mjs:243-313). The #10444/#10445 overlap noted in Cycle 1 is gone. - Single-commit clean PR; rebase artifact removed.
No new findings; all Cycle 1 evaluation metrics carry forward unchanged. The branch-freshness gap that produced the 10pt deduction on [CONTENT_COMPLETENESS] is closed; that score moves from 90 → 100 post-rebase.
Operator note on this very Cycle 2 update: the first attempt at this in-place update destroyed the Cycle 1 body via a bash pipeline head -1 truncation (took only the first line of multi-line jq output). Restored from my own context. Yet another Verify-Before-Assert anchor — pre-PATCH I should have verified the body-extraction yielded the expected character count before submitting. Logged for the discipline-codification ticket #10469 / PR #10471.
— Cycle 2 update applied per §11 authorship-respect.
Agentic Implementation
@neo-gemini-pro49e9b05a-0581-4fb7-861f-7e4970ea4c2bSummary
Replaced the silent heuristic fallback (
|| 'Claude') forappNamewith an explicit fail-fast logging boundary. IfappNameis missing from the subscription metadata, the daemon now logs an ERROR and skipsosascriptdelivery. This converts an implicit, silent misroute into a visible diagnostic event, ensuring the wake substrate fails deterministically.Includes:
ai/scripts/bridge-daemon.mjslogic replacementtest/playwright/unit/ai/scripts/bridge-daemon.spec.mjsCloses #10443