Skip to content

Docs link check stops hiding sections after inline code, /learn prune checks every learning, /retro counts Godot test runners - #4677

Merged
capy-ai[bot] merged 1 commit into
mainfrom
fix/outside-docs-lint-retro-learn
Nov 22, 2026
Merged

capy-ai[bot] merged 1 commit into
mainfrom
fix/outside-docs-lint-retro-learn

Conversation

@garrytan

@garrytan garrytan commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Four small fixes from outside reports: the docs link and prose checks no longer treat a line that starts with inline code as a code block, /learn prune reads every learning instead of the first 100, /retro counts a test runner in tests/ and skips game-engine sidecar files, and five tests that cannot work as root now skip there.
Why: each one was reproduced on main and gave a wrong answer (refused valid links, skipped stale learnings, a test total of 0, red tests as root).
Nothing to do after merge.

Security read

No CI, install, dependency, network, auth or process-spawning change. The outside PRs were read as text only and rebuilt on main; gstack-learnings-search --all only lifts an output limit on a local file the user already reads.

What changed

People hit four wrong answers. A valid docs link was refused, /learn prune quietly skipped old learnings on bigger projects, /retro reported zero test files on a Godot repo, and the free suite went red when run as root. Each now gives the right answer.

Report Repro on main (c2b4f0d) Fix
#4391 / PR #4393 (@Davmunrey) Adding a correct link to troubleshooting.md#unattended-runs-and-artifacts fails scripts/check-doc-links.ts with DOC_LINKS: broken 2. Over all tracked Markdown, 6 false broken links. lib/doc-links.ts and lib/prose-lint.ts read fences as CommonMark does: a backtick fence's info string has no backtick, and only a bare run at least as long as the opener closes it. All tracked Markdown: 185 → 179 broken links, 0 newly reported.
#4215 (@exGeni) 111 learnings, prune's --limit 100 list omits the one stale entry, and the summary gives no sign of the cut. gstack-learnings-search --all; the prune row uses it. The query-only "more matched" notice is unchanged.
PR #4306 (@huongtran84) Godot fixture: TEST_FILES_TOTAL: 0, TEST_FILES_CHANGED: 2 (the .uid sidecar). When no file follows a test naming convention, count code files under a test folder; .uid, .import and .meta never count as tests.
#4425 (@Davmunrey) As root: bun test test/bootstrap-retention.test.ts gives 32 pass, 5 fail. Those five cases skip as root (root passes the ptrace check they depend on). As root: 32 pass, 5 skip; as a normal user: 37 pass.
Why

"Adding a correct link fails the docs check" (#4391), "prune never sees my oldest learnings" (#4215), "/retro says I have no tests" (#4306) and "the free tests fail as root" (#4425). After this change the link check, prune, the test census and the root run all report what is actually there.

Blast radius

The fence change also alters how the prose check masks code in every Markdown file. A second-model review diffed the old and new parser over every tracked .md file. Only 5 files parse differently, each a nested four-backtick fence the old parser closed too early, and the link check passes on all 5 (script ran). --all is a new flag; --limit 0 is still refused, so no existing caller changes (repro).

Pre-Landing Review

No blocking issues. The main review found one test-coverage note (the root check uses the user id where the real condition is the ptrace capability, so a root container without that capability skips cases it could run; CI runs as a normal user, so CI coverage is unchanged). It was left as a note. A second-model adversarial review recommended shipping as-is and raised four low-severity notes, listed below.

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL lib/doc-links.ts:22 unclosed fence silently masks later links; prose-lint reports it, doc-links does not
  • INFORMATIONAL bin/gstack-retro-metrics:401 no-convention fallback counts fixture data, snapshots and .gitkeep under tests/ as test files
  • INFORMATIONAL learn/SKILL.md.tmpl:40 prune reads an unbounded list into context on very large stores
  • INFORMATIONAL test/bootstrap-retention.test.ts:113 uid check is a proxy for CAP_SYS_PTRACE (duplicate of specialist-batched#1)
Exploratory QA

Functional smoke, 4 probes on isolated fixtures, all pass: /retro on a Godot fixture reports 1 test file, 1 changed, 1 inserted line; the link check on a fixture with an inline-code line and a tilde fence whose info string holds backticks reports only the truly broken anchor; gstack-learnings-search --limit 0 still exits 2; on a 12-entry store --all prints 12 and the default prints 10. Not probed: the /learn prune agent flow and the root-only skips (the latter needs a root shell; the repro above covers it).

Eval Results

The eval selector (profile pr) picked no quality judges. It listed behavioral cases that depend on lib/doc-links.ts and lib/prose-lint.ts; the selector marks those as scheduled release coverage, not PR runs, so no paid eval ran for this PR.

Scope Drift

Scope Check: CLEAN. Intent: fix the four outside reports. Delivered: those four fixes, their tests and one changelog fragment.

Plan Completion

Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). This is a bug fix with repros in the table above.

Verification Results

No plan-specific checks (bug fix, no plan file). The exploratory smoke above is the verification: 4 PASS, 0 FAIL, 0 BLOCKED, 0 NOT RUN.

TODOS

No TODO items completed in this PR.

Issues

Refs #4391
Refs #4393
Refs #4215
Refs #4306
Refs #4425

Documentation

Status: current. The docs already match the change, so nothing was edited.

Scope: 12 committed files on fix/outside-docs-lint-retro-learn, compared with c2b4f0d. Nothing was staged, unstaged or untracked. The changes are the CommonMark fence fix in lib/doc-links.ts and lib/prose-lint.ts, the new --all option for gstack-learnings-search (now used by /learn prune), the /retro test-file fallback and the engine-sidecar exclusion, and the bootstrap-retention skips when the suite runs as root.

Documentation health:

  • learn/SKILL.md.tmpl and learn/SKILL.md: current. The prune row uses --all.
  • retro/SKILL.md.tmpl and retro/sections/report-format.md.tmpl: current. They still describe TEST_FILES_TOTAL correctly.
  • CONTRIBUTING.md: current.
  • docs/troubleshooting.md: current.
  • README.md: current. Nothing in it is affected.

Debt: There is no coverage debt and no diagram drift. The --all option is documented in the binary's --help and in the /learn table.

Tests
  • Free suite in CI (run 44990505834 at this head): 1743 test files ran, green.
  • Focused: docs-only + prose-lint, gstack-retro-metrics, gstack-learnings-search, bootstrap-retention (146 pass, 0 fail across the 5 changed test files).
  • bun test test/parity-suite.test.ts: 2 pass. Pre-push guards: typecheck, skill-size, parity-suite, context-budget, module-size, goldens, conflict-markers all pass.
Agent notes

Outside-report lane GSTA-802 (GST-3484).

Approvals

No approvals recorded for branch fix/outside-docs-lint-retro-learn.
Plan: exempt: bug fix (--kind fix); repro on main c2b4f0d is in the PR body

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=4 fixed=0 scope=frozen unbound=1 ledgers_read=3 dispatches=4
Gate edits: none detected (7 listed, 3 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Pre-Landing Review: 1 issue — 0 auto-fixed, 1 asked (0 fixed, 1 skipped), 0 deferred, 0 noted
Adversarial (native, Claude Opus 5.5): 4 noted, 0 blocking. Second-family outside voice: not planned (code class, no numeric claims).

🤖 Generated with Claude Code

{
  "schema_version": 1,
  "pr": 4677,
  "head": "05c86049b1d728b03e4c3bec0c4448124c4d87ec",
  "version": "1.102.2.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1743,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 44990505834,
      "attempt": 1,
      "tree": "1175728fa9d8ac9a0e31e50d36383e65ce6cf2b0"
    }
  ],
  "calls": 14,
  "session_kind": "unattended",
  "run": "ship-4677",
  "head_tree": "1175728fa9d8ac9a0e31e50d36383e65ce6cf2b0",
  "product_patch_id": "602280ab60755f5f7499e86aa4be2d9e721ba72e",
  "gstack_version": "1.102.2.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 44,
    "rules": "630fd3101899e28e",
    "base": "c2b4f0d2adfa66e11143b95d9a42023a09380212",
    "registry": "c2b4f0d2adfa66e11143b95d9a42023a09380212",
    "gate_scan": {
      "tagged": 0,
      "head": "05c86049b1d728b03e4c3bec0c4448124c4d87ec"
    },
    "reasons": [
      "runtime=44"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @1175728fa9d8 (8 checks, current for 05c86049b1d7)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44990505834/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44990505897/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=1175728fa9d8 tests=38819 skipped=104 runs=44990505834/1 profiles=ci-reuse/free-tests heads=05c86049b1d7 verified=2026-11-22T05:58:46.535Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [
      4215,
      4306,
      4391,
      4393,
      4425
    ],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CONTRIBUTING.md, learn/SKILL.md.tmpl and the changed retro/learn skill text"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 4,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 3,
    "unbound": 1,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "gate_dispositions": []
}

Open in Capy

…est census and root-only test failures

The docs link check and prose check follow CommonMark fences, so a line that
opens with inline code no longer hides the rest of the file (#4391, #4393).
/learn prune reads every learning through a new --all flag (#4215). /retro
counts a test runner kept in tests/ without a test-style name and skips engine
sidecar files (#4306). Five bootstrap retention cases skip as root, where the
denial they need cannot happen (#4425).

Co-authored-by: Davmunrey <108531295+Davmunrey@users.noreply.github.com>
Co-authored-by: huongtran84 <4927097+huongtran84@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

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