Skip to content

fix(bg/notifier): strip YAML inline comments from depends_on values#3045

Merged
AceHack merged 1 commit into
mainfrom
fix/notifier-strip-yaml-comments-2026-05-13
May 13, 2026
Merged

fix(bg/notifier): strip YAML inline comments from depends_on values#3045
AceHack merged 1 commit into
mainfrom
fix/notifier-strip-yaml-comments-2026-05-13

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 13, 2026

Summary

parseDependsOn in tools/bg/backlog-ready-notifier.ts extracted the raw line content after the - marker without stripping YAML inline comments. Block-style entries like

depends_on:
  - B-0395  # operational-resonance-conversation-interface (Clifford engine)

were parsed as the literal string B-0395 # operational-resonance-... rather than B-0395, producing a false-positive dangling-dep warning. The row B-0395 exists; the comment was conflated with the ID.

Fix

  • New stripInlineComment(value) helper finds the first whitespace+# and slices everything after it off.
  • Backlog IDs never contain #, so the simple split matches YAML's actual comment semantics (# preceded by whitespace, outside quoted contexts).
  • Applied to both inline-array ([B-0440, B-0441]) and block-style (- B-0440) parsing paths.

Empirical effect

Measured against origin/main before vs after applying the fix:

Before After
Dangling dep ref(s) 9 8

The remaining 8 are real lost-files cases:

  • B-0257..B-0261, B-0289 — addressed by #3044
  • B-0055.1, B-0054.1 — genuine missing sub-row decompositions; out of scope for this PR

Test plan

  • Existing 33 tests unchanged
  • New strips YAML inline comments from block-style depends_on uses the real B-0422 → B-0395 example
  • New strips YAML inline comments from inline-array depends_on
  • bun test tools/bg/backlog-ready-notifier.test.ts → 35/35 pass
  • Worktree-isolated build (/tmp/zeta-notifier-fix) per the multi-Otto split-brain pattern from PR feat(bus): B-0444 — add worktree field to claim envelope #3043's tick shard

🤖 Generated with Claude Code

`parseDependsOn` in `tools/bg/backlog-ready-notifier.ts` extracted the
raw line content after the `-` marker without stripping YAML inline
comments. Block-style entries like

    depends_on:
      - B-0395  # operational-resonance-conversation-interface (Clifford engine)

were parsed as the literal string `B-0395  # operational-resonance-...`
rather than `B-0395`, producing a false-positive dangling-dep warning
(the row exists; the comment was conflated with the ID).

Fix:

- New `stripInlineComment(value)` helper finds the first whitespace+`#`
  and slices everything after it off. Backlog IDs never contain `#`, so
  the simple split is safe and matches YAML's actual comment semantics
  (`#` preceded by whitespace, outside quoted contexts).
- Apply to both inline-array (`[B-0440, B-0441]`) and block-style
  (`- B-0440\n  - B-0441`) parsing paths.

Tests:

- New `strips YAML inline comments from block-style depends_on` uses
  the real B-0422 → B-0395 example that surfaced the bug.
- New `strips YAML inline comments from inline-array depends_on`
  exercises the array path.
- Existing 33 tests unchanged; 35/35 pass.

Empirical effect on origin/main:

  dangling dep ref(s): 9 → 8

(The remaining 8 are real lost-files cases — B-0257..B-0261, B-0289
addressed by PR #3044; B-0055.1, B-0054.1 are genuine missing sub-row
decompositions for a future tick.)

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 13, 2026 22:33
@AceHack AceHack enabled auto-merge (squash) May 13, 2026 22:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a false-positive dangling-dep warning in the backlog-ready-notifier caused by parseDependsOn retaining YAML inline comments as part of the dependency ID string.

Changes:

  • New stripInlineComment helper that trims everything after whitespace+#.
  • Applied to both inline-array and block-style depends_on parsing paths.
  • Added two tests covering block-style (real B-0422 → B-0395 case) and inline-array comment stripping.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tools/bg/backlog-ready-notifier.ts Adds stripInlineComment and applies it in both parsing branches of parseDependsOn.
tools/bg/backlog-ready-notifier.test.ts Adds two tests verifying inline comments are stripped from block-style and inline-array depends_on.

@AceHack AceHack merged commit 3b1e20e into main May 13, 2026
29 checks passed
@AceHack AceHack deleted the fix/notifier-strip-yaml-comments-2026-05-13 branch May 13, 2026 22:37
AceHack added a commit that referenced this pull request May 13, 2026
Records: PRs #3043, #3044, #3045 all merged via auto-merge since
previous tick (B-0444 worktree field; lost-row recovery; notifier
YAML-comment fix). PR #3047 opened this tick to close the final 2
dangling-dep refs (B-0054.1 + B-0055.1 slice rows). Session-arc
substrate-hygiene sweep: 9 → 2 dangling refs on main now, → 0
once #3047 merges.

Co-Authored-By: Claude <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 13, 2026
* fix(backlog): restore missing slice rows B-0054.1 + B-0055.1

Two atomic decomposition slices (B-0054.1 — media-catalog schema
foundation; B-0055.1 — edge-claims catalog) landed earlier as code
without corresponding row files. Nine sibling rows reference these
slice IDs via `depends_on`, and the backlog-ready-notifier surfaced
them as dangling-dep warnings.

Both rows added as `status: closed` (work landed) with bodies
documenting:

- the implementation file path (the canonical artifact)
- retroactive acceptance criteria (all satisfied)
- substrate-honest note that future slices should land row-first

Backlog-notifier effect (against origin/main with PR #3045 merged):

  dangling dep refs: 8 → 6  (the remaining 6 clear once PR #3044 merges)
  ready-to-grind candidates: 211 → 217  (sibling rows unblocked)

Completes the substrate-hygiene sweep:
- PR #3044 recovers B-0257..B-0261 + B-0289 (file-restored from
  unmerged commit)
- PR #3045 fixes notifier YAML inline-comment parsing
- This PR  formalizes the two slice IDs that never had row files

Once all three land, dangling-dep count goes 9 → 0.

Co-Authored-By: Claude <noreply@anthropic.com>

* shard(tick): 2241Z — slice-row restoration + 3 PRs landed on main

Records: PRs #3043, #3044, #3045 all merged via auto-merge since
previous tick (B-0444 worktree field; lost-row recovery; notifier
YAML-comment fix). PR #3047 opened this tick to close the final 2
dangling-dep refs (B-0054.1 + B-0055.1 slice rows). Session-arc
substrate-hygiene sweep: 9 → 2 dangling refs on main now, → 0
once #3047 merges.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants