Skip to content

docs: 68 markdown links pointed at files the Rust rewrite deleted - #606

Merged
athvin merged 1 commit into
mainfrom
docs/fix-broken-code-links
Nov 5, 2026
Merged

athvin merged 1 commit into
mainfrom
docs/fix-broken-code-links

Conversation

@athvin

@athvin athvin commented Nov 5, 2026

Copy link
Copy Markdown
Owner

A link that 404s is a harder defect than a stale sentence. There were 68 of them,
and a repo-wide sweep found them only because I went looking after the earlier passes.

Doc Broken links Aimed at
infrastructure.md 56 server/src/erserver/*.py, src/er/**/*.py, docker/, dbt/, benchmarks/
infrastructure-decisions.md 12 same

git ls-files server returns nothing — all 39 unique targets are from the deleted
Python implementation.

Why de-linked rather than repointed

Every one of the 68 labels was already the path itself (some with a :line
suffix), so converting [path](../path) to `path` loses no information and the
reference stays legible as what the design was written against. Translating 39 unique
paths to Rust owners would have meant guessing, and a confidently wrong path is worse
than an obviously dated one — the same call I made in #603, for the same reason.

Each doc gains a header note saying which way to read it:

  • infrastructure.md: the AWS and Kubernetes design IS current; only the code
    references are not. §1's "the platform today runs as host processes against a
    Docker Compose substrate"
    describes the pre-rewrite starting point — and the
    deployable environment §1 says doesn't exist has since been built.
  • infrastructure-decisions.md: a decision log records what was decided then,
    so its code references are historical by design.

Four more citation defects

Each of these was a claim about where something lives now:

  • frontend-design.md ranked the four roles "in server/src/erserver/auth.py".
    They're ranked server-side in er-server's guard.
  • entity-framework-design.md told you to edit entities/golden_record.yaml,
    twice. The path is entities/golden_record/entity.yaml — entities are
    directories
    . Anyone following that instruction creates a file the catalog ignores.
  • profiling.md says at the top that its harness no longer exists, then tells you
    to bash scripts/ci/profile.sh. performance.md does the same with four make
    targets — benchmark, benchmark-workloads, benchmark-10m, profile-workloads —
    all four gone, along with benchmarks/full_pipeline.py. Both command blocks are
    kept, because they record which workload produced each measurement, but both now
    say plainly that they don't run.

Deliberately unchanged

  • agent-fleet.md's five missing infra paths (infra/modules/arc, scripts/arc_up.sh, …)
    are design targets for its own explicitly-unbuilt phases 2–5, which the doc
    states in its second line. Not stale.
  • python-processing-exceptions.md is an audit of the Python engine and reads
    correctly as one.

Verification

  • 0 broken relative links across docs/, CLAUDE.md and README.md, down from 68.
  • The de-link count asserted at exactly 68 before writing; every other
    substitution asserted to match exactly once.
  • Make-target existence checked individually (grep -qE "^target:" Makefile) rather
    than assumed.
  • skills-check green.

🤖 Generated with Claude Code

A link that 404s is a harder defect than a stale sentence, and there were 68
of them -- 56 in infrastructure.md, 12 in infrastructure-decisions.md -- all
aimed at `server/src/erserver/*.py`, `src/er/**/*.py`, `docker/`, `dbt/` and
`benchmarks/` files. `git ls-files server` returns nothing.

They are now inline code spans, not links. Every one of the 68 labels was
already the path itself (some with a `:line` suffix), so de-linking loses no
information and the references stay legible as what the design was written
against. Translating 39 unique paths to Rust owners would have meant guessing,
and a confidently wrong path is worse than an obviously dated one.

Each doc gains a header note explaining which way to read it:

- infrastructure.md: the AWS and Kubernetes design IS current; only the code
  references are not. §1's "the platform today runs as host processes against a
  Docker Compose substrate" describes the pre-rewrite starting point -- and the
  deployable environment it says does not exist has since been built.
- infrastructure-decisions.md: a decision log records what was decided THEN, so
  its code references are historical by design.

Four more citation defects, each a claim about where something lives now:

- frontend-design.md ranked the four roles "in `server/src/erserver/auth.py`".
  They are ranked server-side in `er-server`'s `guard`.
- entity-framework-design.md told you to edit `entities/golden_record.yaml`
  twice. The path is `entities/golden_record/entity.yaml` -- entities are
  directories.
- profiling.md says at the top that its harness no longer exists, then tells you
  to `bash scripts/ci/profile.sh`. performance.md does the same with four `make`
  targets, all four gone along with `benchmarks/full_pipeline.py`. Both command
  blocks are kept, because they record which workload produced each measurement,
  but both now say plainly that they do not run.

Deliberately unchanged: agent-fleet.md's five missing infra paths are design
targets for its own explicitly-unbuilt phases 2-5, which the doc states in its
second line; python-processing-exceptions.md is an audit OF the Python engine and
reads correctly as one.

Verified: 0 broken relative links across docs/, CLAUDE.md and README.md, down
from 68; the de-link count asserted at exactly 68 before writing; every other
substitution asserted to match exactly once; skills gate green.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@athvin
athvin force-pushed the docs/fix-broken-code-links branch from 03ef860 to 9d8665b Compare November 5, 2026 18:57
@athvin
athvin merged commit b1f7104 into main Nov 5, 2026
39 checks passed
@athvin
athvin deleted the docs/fix-broken-code-links branch November 5, 2026 19:13
athvin added a commit that referenced this pull request Nov 5, 2026
…#608)

Root cause of the #606 failure, where `agent skills (lint + drift)` claimed
`frontend-design-system` never names `frontend-design` against a tree where it
does, at body line 26, and then passed on rerun.

`names_skill_in_backticks` was

    skill_body "$file" | grep -qF "\`$skill\`"

under `set -euo pipefail`. `grep -q` exits the instant it matches, which closes
the pipe while `awk` is still writing the rest of the body. `awk` takes SIGPIPE,
the PIPELINE exits 141, and the function reports the name missing. The match was
found; the plumbing threw it away.

It is a race, which is why three independent reproductions of the exact
`refs/pull/606/merge` tree all passed locally and why the rerun was green. All
three house skills are exposed, not just the one that fired: each names its
counterpart at body line 26, 31 or 34, leaving 6.6-9.7 kB still to write. The
largest remainder belongs to `frontend-design-system` -- 9,739 bytes -- which is
the one that failed.

The repository already knew this pattern. `tf-helpers-test.sh` carries a comment
avoiding it verbatim ("`grep -q` would also SIGPIPE the guard on the way"), and
ci-and-supply-chain's skill states the rule for `detect` jobs: `grep -c`, not
`grep -q`, on anything behind a pipe, because a false skip beats a failure.
`skills-check.sh` simply had an instance nobody had connected to it. The O4 row
pairing check had the same shape with a small writer; hardened too.

Fixed by capturing and then matching in bash, which needs no pipe at all.

A race cannot be trusted to the gate's own green, so it gets a suite:
`scripts/ci/skills-check-test.sh`, wired into the existing toolchain-free
`skills` job. It forces the losing side of the race deterministically -- 239 kB
of body after an early match, so the writer MUST block -- and carries two guards
against itself: a negative control (a genuinely absent name must still report
missing) and a mutation check asserting the PRE-FIX implementation fails the
same case. Without that second one the suite could not tell the fix from the
bug. It also greps the gate for new `| grep -q` instances, because the fix is
one line away from being tidied back off.

Observed failing on purpose: reverting the one-line fix in place turns the suite
red on two assertions and names the file and line. Restored byte-identically.

Co-authored-by: bmoore813 <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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