Skip to content

ci-gate --affected: a docs/ path counts for nothing, but docs/doperpowers/evidence - #102

Merged
SSFSKIM merged 2 commits into
masterfrom
docs-affected
Oct 21, 2026
Merged

SSFSKIM merged 2 commits into
masterfrom
docs-affected

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

This is the follow-up to #101 that the architect agreed at its landing (gate-offload Decision Log 82). With --affected, a path under docs/ no longer sends the run to the full suite. The exception is docs/doperpowers/evidence/p1-e8, the one directory under docs/ that a unit suite reads.

What changed

.github/scripts/gate-affected.mjs:

  • UNREAD = ['docs/']. A changed path under docs/ adds nothing to the selection. A docs-only change therefore runs vitest related over zero paths, and --passWithNoTests lets it pass with no suite run. When docs paths change beside source, the selection is what the source alone would select. A rename that crosses docs/'s border is decided by its other path: docs/a.ts → src/x.ts is a renamed non-test file, so it runs the full suite.
  • docs/doperpowers/evidence/p1-e8/ is now a READ_AS_DATA directory. That check now runs before the outside-the-trees rule, so a path under it runs the full suite and the summary gives the data reason, for example Selection: affected — full suite: read through fs, a glob or a query import (docs/doperpowers/evidence/p1-e8/g0-cli-probe.txt).
    • The rest of docs/doperpowers/evidence counts for nothing, like the rest of docs/. The architect chose this narrow entry on review (second commit, c51f62dbf); the first commit made the whole evidence directory data.

scripts/ci-gate.sh: the --affected usage text says the same.

Who reads docs/

I checked this rather than taking the architect's grep on trust. I searched the suites, test support, the scripts the suites spawn (e2e/support, spikes/protocol-probe/scenarios/pass2/common.mjs, apps/desk-hub/{fake-machine,local}, test/support/*.{mjs,js}), the configs, and every non-test source module. The searches covered fs reads, path joins naming docs, import.meta.glob, and ?raw imports.

Only two unit suites read under docs/, and both read under evidence, which matches the architect's grep:

  • src/shared/plugins/cli.test.ts reads docs/doperpowers/evidence/p1-e8/g0-cli-probe.txt.
  • test/artifacts/r3-labelled-set.test.ts writes docs/doperpowers/evidence/p4-b4.

Everywhere else, docs/ appears in unit code only as a string: sample paths in the composer, git, file and review suites; provenance records; and panel-child-fixture.ts's fixed list of paths, which it never reads. The e2e support reads and writes evidence, but no unit suite runs it.

Tests

.github/scripts/gate-plan.test.mjs:

  • A docs-only change selects with an empty list (related=[]), and its summary is 5 paths, unit runs vitest related. The change mixes M, A, D, and a rename inside docs/.
  • Docs beside a source change select what the source alone would select.
  • Evidence paths outside p1-e8 count for nothing, like the rest of docs/.
  • A p1-e8 path, alone or beside docs, runs the full suite with the data reason.
  • Fallback cases: a p1-e8 path, a script added under p1-e8, a rename into p1-e8, and renames across docs/'s border in both directions.

node --test .github/scripts/*.test.mjs scripts/*.test.mjs: 74 pass.

Runs

  • Landing evidence. Run 39580488094: class 1a on the pool at the head c51f62dbf, without --affected, is green.

    • static (which runs the gate-script tests), unit and probes all passed.
    • The title is ci-gate: c51f62db.
    • unit ran the whole suite in a 507 s job: 1,615 files, with 22,450 tests passed and 80 skipped.
  • First commit's class 1a. Run 39578144338: class 1a on the pool at 869ac0fad, without --affected, is green. static, unit and probes passed. The title is ci-gate: 869ac0fa, and unit ran the whole suite, 1,615 files and 22,450 tests passed with 80 skipped, in a 542 s job.

  • A docs-only change with --affected. Run 39579740200, unit only on the pool, is green. It ran on the first commit; the narrowing does not change a docs-only decision. The scratch commit edits docs/tech-debt-tracker.md and adds docs/m4-docs-proof.md. It was taken from this PR's head through the pinned-origin scratch clone, as ci-gate --affected: iteration runs test only what the change can reach (ci-kit test history, M4) #101's proofs were.

    • The run title is ci-gate: f3ec6a03 affected.
    • The summary is Selection: affected — 2 paths, unit runs vitest related.
    • The unit log shows unit-related: vitest related over 0 paths, then No test files found, exiting with code 0.
    • The unit job took 58 s, against 542 s for the class 1a run above; the test step itself took under a second.
    • Its test-results-unit-1 artifact is a 234-byte JUnit file with no cases.

The replay, on the last 200 landings

I replayed each landing's whole diff, ee9ecace6 back to 270072e79, through the plan's decision.

selected of which docs-only, running no suite
Rule as landed in #101 8 —
First commit (all of evidence is data) 43 24
This PR (only p1-e8 is data) 44 25

Under this PR, the other 156 landings run the full suite. The first path that sends each one there:

Reason Landings
Outside the trees (e2e/ 60, apps/* outside src/test 27, mostly apps/desk-web/e2e; spikes/ 9; other 5) 101
Gate files 31
Too many paths 11
Data in the source and test trees 8
Test support 3
Data under docs/doperpowers/evidence/p1-e8 1
Lockfile 1

Narrowing the entry moved most of the 24 earlier evidence fallbacks to e2e/ rather than into selection, because a landing that writes evidence almost always changes an e2e spec too. Only one more landing selects.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)

…wers/evidence, which suites read

The follow-up the architect agreed at #101's landing. No unit suite, support module, spawned script or config reads
under docs/ but docs/doperpowers/evidence (src/shared/plugins/cli.test.ts reads p1-e8; r3-labelled-set writes
p4-b4); elsewhere docs/ appears in suites only as strings. So a docs path contributes no path to the selection
(UNREAD): a docs-only change runs vitest related over nothing, and docs beside source select as the source alone.
docs/doperpowers/evidence is a READ_AS_DATA directory, checked before the outside-the-trees rule, so a path there
runs the full suite with the data reason. A rename across docs/'s border is decided by its other path.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T09:53:47.838171Z 869ac0f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

… rest of evidence counts for nothing

The architect's choice on #102: cli.test.ts's g0-cli-probe.txt is the one file under docs/ a unit suite reads;
r3-labelled-set only writes evidence/p4-b4. So the READ_AS_DATA entry narrows to evidence/p1-e8/, and a path
elsewhere in evidence counts for nothing like the rest of docs/. The tests move with it: evidence paths outside
p1-e8 in the docs-only case, p1-e8 paths in the fallback cases.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
@SSFSKIM
SSFSKIM merged commit a809f9d into master Oct 21, 2026
SSFSKIM added a commit that referenced this pull request Oct 21, 2026
… path counts for nothing under --affected; docs/doperpowers/evidence/p1-e8/ read as data, the narrow entry the architect chose)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM deleted the docs-affected branch October 21, 2026 10:05
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