Skip to content

fix(swarm): strip markdown punctuation from distribution-map branch cells#6

Merged
jed72 merged 1 commit into
mainfrom
feat/swarm-script-strips-markdown
May 24, 2026
Merged

fix(swarm): strip markdown punctuation from distribution-map branch cells#6
jed72 merged 1 commit into
mainfrom
feat/swarm-script-strips-markdown

Conversation

@jed72
Copy link
Copy Markdown
Owner

@jed72 jed72 commented May 24, 2026

Summary

Defect surfaced during the original cross-task-architectural-integrity work
and recorded as follow-on #6. The parser in scripts/swarm.sh read the §3
table's branch-name cell verbatim, so backticks or asterisks wrapping the
cell (a natural readability choice in markdown tables) became part of the
actual git ref name. Git accepted such names, but every downstream operation
(checkout, push, integrate.sh) needed shell escaping.

Fix: pipe the trimmed cell through `sed -E 's/^[`]+//; s/[`]+$//'`
to strip leading/trailing markdown punctuation. Bare names round-trip
unchanged. Markdown inside a ref name is out of scope — git ref-validation
rejects such names anyway.

Six lines of comment added above the parser explaining why.

Route

Express (solo). One scenario, Scenario Outline with five Examples covering:
single-backtick wrap, bold, bold+backtick, no-formatting regression,
leading-whitespace+backtick.

Test plan

  • `pytest tests/` — 184/184 PASS (179 prior baseline + 5 parametrised)
  • `python3 cli/compass check --task swarm-script-strips-markdown` — 10/10 PASS
  • TDD red-then-green honoured (first green attempt failed honestly on test scaffold, not on the fix; corrected and re-greened)
  • CI `self-check` — pending on PR

Notes

  • Closes the prior task's open follow-on fix(swarm): strip markdown punctuation from distribution-map branch cells #6
  • Honestly imperfect TDD cycle recorded in devlog — pre-tool hook + tdd-green refused to record a passing-by-accident green; required a real fix
  • Verify's typed-DoD check caught two bare unchecked DoD items and forced an explicit "tick / evidence / backfill" decision (dogfooding the R5 mechanism from the original task)

🤖 Generated with Claude Code

…ells

The parser in scripts/swarm.sh read the §3 table's branch-name cell verbatim,
so backticks or asterisks wrapping the cell (a natural readability choice in
markdown tables) became part of the actual git ref name. Git accepted such
names, but every downstream operation (checkout, push, integrate.sh) needed
shell escaping.

Fix: pipe the trimmed cell through sed -E 's/^[`*]+//; s/[`*]+$//' to strip
leading/trailing markdown punctuation. Bare names round-trip unchanged.

Closes the prior task's plan.md §5 item #6 (TRC-1).
Copy link
Copy Markdown
Owner Author

@jed72 jed72 left a comment

Choose a reason for hiding this comment

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

Approved

@jed72 jed72 merged commit ada8af0 into main May 24, 2026
1 check passed
@jed72 jed72 deleted the feat/swarm-script-strips-markdown branch May 24, 2026 11:25
jed72 added a commit that referenced this pull request May 24, 2026
Cuts the 1.0.0 stable release. Three substantial PRs have shipped since 1.0.0-rc.1: PR #4 (architectural integrity suite), PR #5 (Compass self-architecture), PR #6 (swarm.sh parser fix). Remaining follow-ons are enhancements, not gaps. Bumps the four locations carrying the version string and adds a regression test guarding against partial bumps.

Merged via --admin override per the established CODEOWNERS-blocks-self-approval pattern (solo-maintainer repo).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

1 participant