Skip to content

docs: one file per data-dependence row, built into docs/data-dependence.md (#1088) - #1090

Merged
amiddavid merged 3 commits into
mainfrom
docs/data-dependence-per-row
Nov 11, 2026
Merged

amiddavid merged 3 commits into
mainfrom
docs/data-dependence-per-row

Conversation

@amiddavid

Copy link
Copy Markdown
Collaborator

No behavior change. This PR changes docs, tests and a generator. It does not touch the proxy or the library. Data dependence: none. It changes how the rows are stored, not any feature's dependence.

Closes #1088

Summary

  • Each row of the component and feature tables is now its own file under docs/data-dependence/.
  • A generator builds docs/data-dependence.md from the files. The page stays checked in.
  • Two PRs that change different rows no longer edit the same file for their row.

What changed

  • docs/data-dependence/components/<name>.md: 24 files. docs/data-dependence/features/<slug>.md: 28 files.
  • docs/data-dependence/page.md.tmpl: the hand-written text of the page, with two placeholders for the rows.
  • cmd/gen-datadep and internal/datadep: the generator and the parser. Standard library only.
  • internal/datadep test: fails when the checked-in page differs from the generator output. The message names the command.
  • components/all/datadep_test.go: reads the component row files. All guards stay: a registered component without a file, a file for an unknown component, an empty cell, a short reason, a code reference as reason, a bad Kind, a misspelt name (reported, not skipped).
  • make datadep runs the generator.
  • Docs: CLAUDE.md (Metadata first), RELEASING.md (merge of main step 9), .github/pull_request_template.md, .claude/skills/offload-review/review-prompt.md (new rule for reviewers), mkdocs.yml (the row directory is not a site page), and a new section "How to add or change a row" on the page itself.
  • .gitattributes: marks the page linguist-generated, so GitHub folds it in diffs.

How to add a row now

  1. Add or edit docs/data-dependence/components/<name>.md or features/<slug>.md. Copy a neighbour.
  2. Run go run ./cmd/gen-datadep.
  3. Commit the row file and the rebuilt page.
  4. On a conflict in the page: take either side and run the generator again. Do not resolve by hand.

Row file format: lines of key: value between two --- lines (not YAML), then the reason as text. An optional order number sorts rows. Without it, rows sort by file name after the numbered ones.

How it was tested

On the shared box, with -race:

  • go vet ./...: clean.
  • go test -race ./internal/datadep/... ./components/all/...: pass.
  • The generator reproduces the page: both tables are byte-identical to main. Running it twice gives the same bytes.
  • Mutations:
    • Delete mask.md: the component test fails, and names the missing file and the command. The page test fails too.
    • Add a file for a component that does not exist (ghost, dedupp): the component test fails.
    • Edit dedup.md without running the generator: the drift test fails and says to run go run ./cmd/gen-datadep.
  • Not run: mkdocs build --strict (not on this machine). CI docs checks will cover it.

Technical notes

  • First diff of the page. It is not empty. The only changes are: a "generated file" comment on top, two sentences that point to the row files, and a new section "How to add or change a row". The 52 table rows are unchanged.
  • Conflict handling. Two PRs can still both rewrite the generated page. If their rows are far apart, git merges it. If not, there is a conflict. A merge=ours rule in .gitattributes does not fix this: GitHub ignores custom merge drivers, and the rule would keep a stale page in local merges. So the process is: re-run the generator on a conflict, and the drift test catches a stale page. The row files do not conflict. The fix removes the conflict in the part that people write, and makes the one in the page mechanical.
  • Prose outside the tables (for example the counts in the Summary) is in page.md.tmpl. A PR that edits it can still conflict with another PR that edits the same lines.
  • Sort order. Rows keep today's order through an order key (10, 20, ...). A new row without order goes last, in file name order.
  • File names. A component file must be named after the component. A feature file uses a short slug.
  • The ~/.claude global files are outside this repo and are not changed.

…ce.md (#1088)

Each row of the component and feature tables is now its own file under
docs/data-dependence/. cmd/gen-datadep builds the page from them and a
template. internal/datadep tests that the checked-in page is current.
components/all/datadep_test.go reads the component row files and keeps
every guard. CLAUDE.md, RELEASING.md, the PR template and the review
prompt describe the new steps.

No change to the proxy or the library. The tables keep their text.

Closes #1088

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session fresh 1 of 2 1 of 2 c9acef070cc0 approve

Verdict: approve

Findings

None. The PR changes docs and tooling only. No proxy or library code changed, so no fail-open
path and no behavior change is at risk.

Non-blocking

  • internal/datadep/datadep.go:137 — Row.Line escapes | as \|, and Build
    (internal/datadep/datadep.go:163) guards the placeholder count. Neither has a direct unit
    test. TestGeneratedPageIsUpToDate covers both only by accident: no current row value holds a
    |, so the escape path is never exercised. A two-line table test in
    internal/datadep/datadep_test.go would close this.
  • Feature rows may use any display name (name: **Keep-alive pings**), and no test ties it to
    the file name. Components are checked (components/all/datadep_test.go:63). The old table had
    the same gap, so this is not a regression.
  • internal/datadep/datadep.go:151 — parse checks that required keys are present, not that
    they are non-empty. For components, components/all/datadep_test.go:93 catches empty cells.
    For features, nothing does. Same as before the PR.

What I checked

  • Read the full diff (d501cdb5..c9acef07): CLAUDE.md, RELEASING.md, the PR template, the
    review-prompt skill, Makefile, .gitattributes, mkdocs.yml, cmd/gen-datadep/main.go,
    internal/datadep/datadep.go, both test files, the template, and the generated page.
  • The checked-in page equals the generator output. Go is not installed here and live tests
    are not approved, so I re-implemented Load/parse/Line/Build in Python, line for line
    from the Go source, and ran it on the 24 component and 28 feature row files. The result
    matches docs/data-dependence.md byte for byte. This is a simulation, not the real generator;
    a go test ./internal/datadep run on the eval box would confirm it.
  • No row content changed. I parsed the two tables out of the base page (d501cdb5) and the
    new page, and compared all 52 rows cell by cell: 24 of 24 component rows and 28 of 28 feature
    rows are identical. No row was added, lost, or reworded. Only the prose sections that moved
    into page.md.tmpl changed, and I read those diffs.
  • The parser is strict in the right places. parse rejects an unknown key, a duplicate key,
    a bad order, a missing required key, and a file without front matter. Values may contain
    : (the split takes the first one), so where: Store: the original parses correctly.
  • The stronger test. The old components/all test read the rendered table and could skip a
    malformed row silently. The new one loads the row files through datadep.Load, which fails on
    any malformed file, and adds a name-shape check and a name-equals-file-name check. Coverage is
    equal or better on every case the old test handled, including buildTagged (skeleton).
  • Import rules. components/all (external test package) may import internal/datadep; both
    live under the module root.
  • Site wiring. mkdocs.yml excludes data-dependence/ (row files and template stay
    unpublished) and keeps data-dependence.md in the nav. linguist-generated=true only affects
    GitHub's diff folding and language stats; it does not change merge behavior, which matches the
    comment in .gitattributes.
  • Every other reference to the page (dash/schema.go, pi-package/README.md,
    docs/reference/session-recorder.md, scripts) is a link, not an instruction to edit the page
    by hand. Nothing contradicts the new rule.
  • Repo rules: no data-dependence change for a component or feature (none is touched), no
    behavior change, DCO sign-off present on the commit.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session fresh 2 of 2 1 of 2 c9acef070cc0 approve

Verdict: approve

Findings

None. The change is docs and test tooling only. It does not touch the proxy or the library.

Non-blocking

  • internal/datadep/datadep.go:31 — the Keys comment says the keys are "in the order they are
    allowed to be written". parse accepts any order. Fix the comment, or enforce the order.
  • internal/datadep/datadep.go:152 — Row.Line escapes | as \|, but does not handle a value
    that already holds \|. No row file today holds a pipe, so nothing breaks. Note it for anyone
    who copies a cell from the old page.
  • Feature rows keep no check for an empty cell or a short reason. The components test checks only
    components. This is the same coverage as before the PR, so it is not a regression.

What I checked

  • The full diff, all 65 files: the two Go packages, the generator command, the rewritten
    components/all/datadep_test.go, all 52 row files, the template, and every doc touched.
  • The checked-in page matches the generator. I re-implemented internal/datadep in Python
    (read-only, no Go run) and built the page from the row files and page.md.tmpl. The output is
    byte-identical to docs/data-dependence.md. The placeholder count check, the sort by
    (order, file name), and the pipe escaping all match the Go code.
  • No row content changed. Both tables in the new page are byte-identical to the tables on the
    base commit. All 24 component rows and all 28 feature rows moved unchanged.
  • The row files match the registry. The 24 component file names equal the 24 names passed to
    components.Register in the code. Each name: field equals its file name.
  • The parser fails closed. I traced each rejection path: unknown key, duplicate key, missing
    key, bad order, unclosed front matter, and a line without key: value. All return an error,
    and Load wraps it with the file path. A key: line with an empty value is accepted, and the
    components test then rejects the empty cell.
  • The page cannot drift silently. A hand edit to the page, or a row file edited without
    re-running the generator, both fail TestGeneratedPageIsUpToDate. Its message names the command.
  • Template safety. Build requires each placeholder exactly once. A row body that contains a
    placeholder string either fails that check or stays literal text. No injection path.
  • mkdocs. exclude_docs: data-dependence/ copies the existing superpowers/ pattern. The
    Docs workflow runs mkdocs build --strict on docs/**, so the new directory and the exclusion
    are exercised in CI on this PR.
  • Hard boundaries. No runtime behavior changes, so no human sign-off is needed. No feature's
    data dependence changed, so no row content change. The internal/datadep import sits in a
    _test.go file of components/all, so the public components package does not import
    internal.
  • The PR body's claims match what I verified by hand: file counts (24 + 28), byte-identical
    tables, and the guards kept in the rewritten test.
  • I ran no Go builds or tests; live tests were not approved.

#1074 and #1068 added rows to docs/data-dependence.md after this branch.
They are now files under docs/data-dependence/features/, and the page is
rebuilt by the generator. Both tables equal main's tables.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: DAVID AMID <[email protected]>

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session resumed 2 of 2 2 of 2 98d63837c1cd approve

Verdict: approve

Findings

None. The new work since round 1 is a merge of main and one fix commit. Both are correct.

Earlier findings

  • Round 1 had no blocking findings from either reviewer. Both round-1 reviews approve.
  • My round-1 non-blocking notes (the Keys comment, the \| escape note, the feature-cell
    emptiness gap) are not addressed. The fix commit spends the round on the merge instead.
    I have no objection: all three were non-blocking, and none got worse.
  • Reviewer 1's non-blocking notes (a unit test for the pipe escape, the feature-name gap, the
    empty-value gap) are not addressed either. Same reasoning. If the author wants to close
    them, a later PR can.

The new commits

  • 4151d33a — merge of origin/main (202087de). main added two feature rows to
    docs/data-dependence.md (#1074 and #1068) after this branch rewrote that file. The merge
    keeps both new rows in the page and keeps every change this branch owns. I checked the one
    file both sides edited, mkdocs.yml: the result holds the branch's exclude_docs entry and
    main's new Pi nav line. No file this PR owns was mangled.
  • 98d63837 — the fix commit. It moves the two rows main added into
    docs/data-dependence/features/fivehour-weights.md and own-model-call.md, with order 255
    and 155. I checked each claim:
    • Both files parse under the generator's rules (unknown keys, duplicates, and a bad order
      all fail closed; my simulation of internal/datadep reads both without error).
    • The rendered rows are byte-identical to the rows main carries: same name, kind, level
      cells, reason text, and table position.
    • The off: value in fivehour-weights.md holds ( and # but no : before the key
      split, so the first-colon cut is safe. The simulation confirms it.

Non-blocking

None new.

What I checked

  • Last review: round 1, c9acef070cc01602ce744027c4fe366c95b8c479, 2026-11-11T12:12:33Z.
  • New commits read: 5 in c9acef07..HEAD — 4151d33a (merge main into the branch),
    98d63837 (move main's two rows into row files), and the three main commits the merge
    brought in (202087de Bob model route, f123d528 README install pages, 9dda47de 5-hour
    weights). The three main commits are already reviewed on their own PRs; I read them to
    check the merge resolution, not to re-review them.
  • Read in full: 2 reviews, 0 comments, 0 inline comments (from .review-in-reviews.txt,
    .review-in-comments.txt, .review-in-inline.txt; the last two are empty).
  • New items since my last review: the two commits above. Nothing else — no comment, no inline
    reply, no new review. I checked each commit as a first review, per step 4.
  • The page still matches the generator. I re-ran my Python simulation of
    internal/datadep on the head: the output is byte-identical to the checked-in
    docs/data-dependence.md.
  • Both tables equal main's tables. I parsed every table out of 202087de's page and the
    head's page and compared line by line: all 13 tables are identical. The Features table holds
    30 rows now (28 from round 1 plus the 2 from main), and every row matches main byte for
    byte. So the merge lost no row and changed no cell.
  • The PR diff vs the new base is the round-1 change plus the two row files. I diffed
    202087de..HEAD against the round-1 diff: the file set is the same 65 files plus
    fivehour-weights.md and own-model-call.md, and the only content difference in a shared
    file is mkdocs.yml's Pi nav line, which comes from main itself.
  • The commit carries the DCO sign-off and the Assisted-By: line, per repo rules.
  • I ran no Go builds or tests; live tests were not approved.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session resumed 1 of 2 2 of 2 98d63837c1cd approve

Verdict: approve

Findings

None. The PR head is correct and complete.

Non-blocking

Carried from round 1 (mine and reviewer 2's). The author pushed no change that answers them, and
gave no reason to check. All stay non-blocking:

  • No direct unit test for the | escape in Row.Line and the placeholder guard in Build
    (internal/datadep/datadep.go).
  • A feature row's display name may differ from its file name, and feature cells have no
    empty-or-short check. Both new feature rows added since round 1
    (fivehour-weights.md, own-model-call.md) use display names that differ from their stems, so
    the gap is now visible in two more files. Same severity as round 1.

Earlier findings

  • Round 1, reviewer 1 (me): approve, 3 non-blocking notes. Not fixed, not rejected. No author
    reply exists; the new commits do not touch them.
  • Round 1, reviewer 2: approve, 3 non-blocking notes (comment wording on Keys, \| in a copied
    cell, feature empty-cell checks). Not fixed, not rejected. I checked each myself in round 1
    and agree with the author's implicit position: none blocks.

What I checked

  • Last review: round 1, c9acef0, 2026-11-11T12:10:36Z.
  • New commits read: 4 — 4151d33a (merge of origin/main), 202087de (#1074, main), f123d528
    (#1083, main), 9dda47de (#1068, main), plus the PR's own 98d63837 (two new row files).
  • Read in full: 2 reviews, 0 comments, 0 inline comments (from the three files).
  • New items since my last review: reviewer 2's round-1 review (12:12:33Z) — read in full, agree
    with its verdict; commit 98d63837 — reviewed below; the merge 4151d33a — resolution checked
    below. No author replies exist anywhere on the PR.

The new head and the merge:

  • The page still equals the generator output. I re-ran my Python simulation of
    Load/parse/Line/Build at 98d63837, now over 24 component and 30 feature row files.
    Byte-identical to docs/data-dependence.md. (Simulation, not a Go run; live tests are not
    approved.)
  • The commit's claim holds: both tables equal main's tables. I parsed both tables out of
    202087de:docs/data-dependence.md (main) and the head page, and compared them row by row:
    24 of 24 component rows and 30 of 30 feature rows identical, in the same order. The order
    values 155 and 155/255 place the two new rows exactly where main's hand edits put them.
  • The merge is a faithful union. Relative to main, the merge changed exactly the branch's 65
    files, and every one of them is present. The two files both sides touched
    (docs/data-dependence.md, mkdocs.yml) hold both sides' changes: the page keeps the branch's
    generated form plus main's two rows; mkdocs.yml keeps the branch's exclude_docs line plus
    main's Pi nav entry.
  • The two new row files parse cleanly, carry all required keys, and their kind: metadata
    and "Decided by" text match the rows main added in #1074 and #1068.
  • One transient state, not a finding: at the merge commit 4151d33a alone the page held the two
    rows but the row files did not exist, so the page-freshness test would fail there. The pushed
    head 98d63837 is consistent, and only the head is tested.

The main commits the merge brought in (their own PRs reviewed them: 3 rounds for #1074, 5 for
#1068; both approved and merged):

  • #1074 (agent/, cheapmodel/, proxy/): read the full diff and
    proxy/agentmodel.go. Fail-open is kept: a panicking agent gives the zero target, an unsafe
    path or auth scheme is dropped field by field, and an owned route gets no server-held key. No
    interaction with this PR beyond its data-dependence row, now a row file.
  • #1068 (dash/): read fivehourfit.go, fivehourweights.go, keepalive.go,
    keepaliveapi.go, api.go, the UI diffs and docs/dashboard.md in full, and skimmed the
    three test files. The gate and every error path fail open to API prices. No interaction with
    this PR beyond its row.
  • #1083 (README, how-to pages): docs only, read in full. Pure moves; the README table now
    links the two new guides.
  • Repo rules: the PR's own commit is docs-only, no behavior change, DCO sign-off present. The
    row-move commit changes no row content — I verified the two rows byte-for-byte against main.

@amiddavid
amiddavid merged commit 9966adf into main Nov 11, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Nov 11, 2026
vz-ibm added a commit that referenced this pull request Nov 12, 2026
Conflicts:
- #973 (bob-ultrahigh preset): kept its presets, PRICED_PRESETS and
  the proxy_too_old preset check, next to this branch's strategy table
  reader and MINIMUM_BOB_RELEASE (0, 7, 1). BOB_CACHE_STRATEGIES stays
  removed. Tests now expect bob-ultrahigh as the default preset.
- #1090 (data-dependence row files): the Bob plugin sentence moved to
  docs/data-dependence/features/bob-plugin.md; the page is rebuilt
  with cmd/gen-datadep.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Vitaly Zabershinsky <[email protected]>
boazdavid added a commit that referenced this pull request Nov 12, 2026
The proxy's startup moved from cmd/context-guru-proxy/main.go to proxyapp.Main (#1109), so
the push wiring moves with it: the four --metrics-push flags, the start of the push before
proxy.New, the two proxy.Options fields, and the keep-alive ping hook on dashEmitter. The
push files metricspush.go and metricspush_test.go move into package proxyapp. The earlier
commits in this branch keep cmd/context-guru-proxy/main.go as upstream has it; this commit
is where the proxy starts to use them, so those commits do not build the wiring on their own.

The data-dependence row is now a row file, docs/data-dependence/features/metrics-push.md,
as #1090 requires, and docs/data-dependence.md is rebuilt from it. The text of the row is
unchanged except that the token sentence says the central asks for none today (#1130).

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: DAVID BOAZ <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

docs: one file per data-dependence row, so PRs stop conflicting in docs/data-dependence.md

1 participant