Skip to content

Promote the #1155 Carried-Text Fixes and the Composite Action Schema Check - #1687

Merged
ptr727 merged 2 commits into
mainfrom
develop
Sep 18, 2026
Merged

ptr727 merged 2 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Promotes the two changes that implement #1155's recorded answers, items 1 to 3 as prose and item 4 as tooling.

The delta

Two squash commits, 21 files, read from git diff origin/main origin/develop rather than from a local fast-forward's file list:

  • e18730f #1685, the carried-text defects.
  • d0e722f #1686, the composite-action schema check.

What changes for a carrier

repo-worktree no longer forbids in one unit the command it requires in another. "The Base Branch" names the base-clone return as a second exception beside the cleanup step, with the ban rescoped to commands that mutate the working tree, index or HEAD, so worktree remove and branch -d sit outside it rather than as uncounted exceptions. "Creating a Worktree" splits the continuation by which checkout holds the branch: the base clone is returned to develop when its tree is clean and stopped on when it is not, while a previous session's worktree is retired rather than switched, since it normally occupies the very path worktree add wants.

resync-a-repo carries both audit invocations itself rather than pointing at RESYNC.md section 2 for them, so the skill works read in isolation. python3 spec/audit.py <RepoName> measures the ground-truth branch the registry names, and --branch <ref> previews in-flight work. The invocation is spelled with python3 at all four sites, since a shebang does not execute on Windows and this fleet declares that platform first-class.

GOVERNANCE.md "Repository Layout" gains rows for STANDUP.md/RESYNC.md, .agents/, host-setup/, .github/skills/ and .claude-plugin/fleet-skills/, and no longer describes this repository's CI as lint-only or its .github/workflows/ as holding only its own workflows.

A new CI gate validates every tracked action.yml under .github/actions/ against the action-metadata schema, which actionlint cannot do because it parses an action file as a workflow. It found eight real defects on its first run, all fixed in the same change. workflow-ci-contract now states what each check reads and what neither reads, all of it measured rather than asserted.

Review coverage

Both pull requests reached every Merge Gate item before merging: review on head, full coverage, no refusal, zero unresolved threads and zero suppressed findings on head, checks 8 of 8.

One boundary, already recorded on #1686 and repeated here so it is not inferred from a green check: CodeRabbit did not review that pull request. Its check reports pass while its own reply to the explicit trigger reads "Review rate limited", and it posted zero comments there. It did review #1685. Proceeding on Copilot plus the local passes there was the maintainer's call rather than an inference from the check.

No closing references

None of the issues this work touches is finished by it, so this pull request closes nothing.

  • Four Procedure and Layout Defects in Carried Text That Need a Decision, Not a Reword #1155 keeps items 5 to 10. Item 5 has a recorded answer and no implementation, and items 6 to 10 have no answer.
  • #1684 keeps README.md's copy of the lint-only claim and the question of whether the prose term or the registry classification is the defect.
  • #1682 is unimplemented, though this round's own cleanup ran its recommended fix by hand and it worked: the remote branch delete ran from each task's worktree before that worktree was removed, which the guard permits where the base clone would have denied it.

🤖 Generated with Claude Code

…1685)

Fix the Base-Clone Conflict, the Missing Audit Flag, and the Layout

Implements items 1 to 3 of the four answers recorded on
[#1155](#1155). Item 4
is tooling rather than prose and lands separately, so a tooling problem
does not hold these three.

## Item 1: `repo-worktree` no longer forbids the command it requires

"The Base Branch" banned every mutating command in the base clone with
one exception, "Listing and Cleanup"'s terminal step. "Creating a
Worktree" separately requires a continuation to return a checkout
holding the task branch to its own working branch, which in the base
clone is exactly the forbidden `checkout`. A reader met two units giving
opposite instructions and neither stating an exception.

The recorded answer was to name the switch a second exception rather
than to let the ban win absolutely, which would stall the continuation
case the mandate exists for. `gh-write-guard.py` already exempts a
non-force `checkout <ref>`/`switch <ref>` and that unit already names
the exemption, so only the prose moves and the documented path becomes
performable.

The exception is one sentence, and the procedure it names went to
"Creating a Worktree", where the switch is actually performed. That
section gave one remedy, a switch on a clean-tree test, for two cases
that need different ones. It now splits by which checkout holds the
branch, which `git worktree list` answers and which it prints the base
clone first in. The base clone is returned to its own working branch and
the worktree is then created. A previous session's own worktree is
retired instead, because it normally sits at the exact path
`worktree add` wants, so the command aborts on the existing directory
whatever its branch is. That is the shape `backlog-burndown` already
calls retire-then-dispatch while citing this skill for it, so the skill
holding the rule had been instructing the opposite of the skill pointing
at it.

No caveat rides along. Four review passes each found the one I had
added, in a new form each time, and the last of them fired on every
continuation rather than none, which nullified both remedies above it.
"The Mandate" already carries the stop rule for a tree another task is
live in, and it keeps it alone.

## Item 2: `resync-a-repo` states both audit invocations itself

The skill sent the reader to `RESYNC.md` section 2 and named no flag, so
a re-run after fixes measured the target's `main` and re-reported
everything the in-flight convergence ref had already fixed.

Both invocations now sit in the skill: `python3 spec/audit.py <Repo>`
for the first read of `main`, and
`python3 spec/audit.py --branch <ref> <RepoName>` to preview in-flight
work. They are stated rather than pointed at so the skill still works
read in isolation, with no hub checkout open beside it, and the pointer
now says section 2 carries further commands these two do not replace,
since a reader holding two of its four is the one likeliest to skip it.

## Item 3: `GOVERNANCE.md` "Repository Layout" covers the tree

Three content problems, all fixed.

`.github/workflows/` was described as "this repo's own lint-only CI and
source-only release". In a carrier that asserted the carrier's CI is
lint-only and its release source-only, which is wrong for every csharp,
python, docker and hugo repo in the fleet. The row now qualifies the
hub-specific half and adds the fleet's reusable task workflows, which
the description omitted entirely. It says a repo reaches them with
`uses:` rather than that every repo already does, since
`reports/workflow-reuse.md` records zero direct callers for both
`validate-task.yml` and `build-release-task.yml` and
`docs/reusable-workflows.md` still has rollout stages unchecked.

`STANDUP.md` and `RESYNC.md` are hub-only procedure docs at the root and
appeared nowhere in the layout, so a reader following `AGENTS.md`
"Fleet Bootstrap" to them was sent to `docs/` and found neither. Both
now have a row.

`.agents/` and `host-setup/` are cited by path from other canonical
units and were likewise absent, an omission invisible because the list
otherwise reads as complete. Both now have a row, and the `host-setup/`
row names Linux and Windows rather than calling the installers
cross-platform, since that tree carries no macOS installer while this
file defines cross-platform as Windows, macOS and Linux.

The two generated Skill trees get a row each rather than sharing a
clause. `.github/skills/` is carried verbatim to every repo per
`spec/files.json`, so it is not hub-only and a fix to it belongs at
`.agents/skills/`. `.claude-plugin/fleet-skills/` is the hub-only plugin
copy, and the row says `marketplace.json` beside it is hand-authored,
since `build_dist.py` never writes that file.

## Verification

The declared local gate set in `OPERATIONS.md` "Local Verification"
passes whole. The `repo-worktree` and `resync-a-repo` edits regenerate
into all three distributions.


## Local review

Four adversarial passes, 24 findings, every one dispositioned. Two
declined with evidence: repo-relative links to hub-only paths,
consistent with the six pre-existing hub-only rows in the same
intent-fidelity section, and sentence length, where the opt-in
`sentence-length` check is violated pervasively tree-wide. The rest
fixed.

Three of the four passes found the same invented caveat, in a new form
each round, and the last one fired on every continuation rather than
none. It is deleted rather than rewritten a fourth time.

## Not this pull request

[#1684](#1684), filed
from this work: `GOVERNANCE.md` and `README.md` both say this
repository's CI is lint-only, and `.github/actions/validate` runs the
script test suite plus four selftests on every pull request. The
`.github/workflows/` row here restates that clause without originating
it, and the fix spans `README.md` and the registry entry.

`RESYNC.md` section 2 says "Three commands cover the mechanized part"
and then walks "the first / the second / the third" over a four-line
block, leaving `--branch` uncounted. Pre-existing, outside this diff,
not filed yet.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Clarified repository worktree continuation and cleanup guidance,
including handling clean and unclean working states.
* Updated repository resynchronization instructions to use consistent
audit commands and support branch-specific checks.
* Expanded governance documentation to describe repository layout,
shared skills, host setup resources, reports, and reusable workflow
organization.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Check Composite Action Metadata Against the GitHub Action Schema

Implements item 4 of the answers recorded on
[#1155](#1155). Items 1
to 3 are prose and land separately.

## The gap

`workflow-ci-contract` "After Any Workflow Edit" sent a reader to
actionlint. actionlint's own file list is `.github/workflows/*.yml` and
`*.yaml`, and it opens a composite action's `action.yml` only through a
workflow's `uses: ./.github/actions/<name>`, and only to judge that
caller's `with:` block against the action's declared inputs. Nothing
read the action file as action metadata. So a reader edited an
`action.yml`, ran the prescribed check, and got a clean result that had
judged only the caller's contract with it.

## Why actionlint cannot be the tool, measured rather than inferred

`docker run --rm -v "$PWD":/repo -w /repo rhysd/actionlint:latest
.github/actions/validate/action.yml` exits 1 with six syntax-check
errors, `"jobs" section is missing in workflow`, `"on" section is
missing in workflow`, and `unexpected key` for each of `description`,
`inputs`, `outputs` and `runs`. It parses action metadata as a workflow,
so widening its globs is not available.

Measured on a scratch repository, so the corrected skill text claims no
more than what actionlint does: a composite action carrying a malformed
`if:` expression and an unterminated shell `if` in a `run:` block, plus
a second action referenced by no workflow and missing both its top-level
`description` and an input's, passes actionlint at exit 0. The same two
files put to `check-jsonschema` report the two missing descriptions.

## What runs instead

`check-jsonschema`'s `vendor.github-actions` builtin, which is GitHub's
own action-metadata schema. It runs via `uvx`, beside the ruff and mypy
invocations already in the same job, because `check-jsonschema`
publishes no container image: upstream `python-jsonschema` carries no
Dockerfile and Docker Hub holds only unaffiliated rebuilds. That is why
`scripts/docker_lint.py`, which the recorded answer named, is unchanged:
it runs each linter in a container with `--network none`, so neither a
pulled image nor an in-container install is available to it.

- `validate-task.yml` gains a `Lint composite actions step`, gated on
  the metadata existing, taking its file list from git and skipping
  rather than invoking on an empty argument list, matching the shell and
  PowerShell steps above it. It sits after the Python steps rather than
  beside actionlint because it needs the uv they set up.
- `Setup uv step` now also fires for a repo that carries composite
  actions and no `pyproject.toml`, which would otherwise reach the new
  step with no `uvx` on the runner.
- Both the guard and the file list use `**`, the guard through
  `hashFiles` and the list through a `:(glob)` pathspec, so the two
  describe one set. `hashFiles`'s `*` does not cross a `/` and git's
  default pathspec `*` does, so the earlier `*` form would have skipped
  a repo whose actions nest one level deeper while still checking a
  nested file whenever a flat one existed.
- `OPERATIONS.md` "Local Verification" runs the same command, with the
  same empty guard. Without it, a checkout carrying no composite action
  reaches `check-jsonschema` with no instance files, which exits 2 and
  aborts the rest of the block under its own `set -Eeuo pipefail`.
- `GOVERNANCE.md` "Running the Linters Locally" names the new check,
  since that block states it is the whole of `validate-task.yml`, and
  both host READMEs name it in their own enumeration of the lint tools
  that run through a container or `uvx` rather than natively. That
  section's own lead names it too, since it tells an agent to trust that
  enumeration before reporting a check unavailable.

## What the corrected skill text says

"After Any Workflow Edit" now says which part of a composite action each
check reaches, and what neither reads: a composite action's `run:`
bodies and its `if:` expressions. It also says that where no workflow in
the repository names the action, actionlint reaches it not at all, which
is the ordinary shape downstream: a repo's hooks are invoked from a hub
reusable workflow, and no workflow in that repo carries a
`uses: ./.github/actions/...` line, so its own actionlint run never
opens them. `docs/reusable-workflows.md` stated the reason wrongly in a
snippet comment and is corrected to that one.

The schema check's scope is stated as `.github/actions/`, matching the
step's own guard, since an action file outside that tree is read by
neither check.

## The producer-failure shape this repository already ruled against

The step's file list is written to a file rather than into a process
substitution. `.github/workflows/canonical-review-sweep.yml` states the
reason in this tree already: `mapfile` reports success whatever the
producer did. Measured both forms against a failing `git ls-files`: the
redirect aborts the step at 128, and `mapfile < <(...)` continues with
an empty array and exits 0, which would have reported "no composite
action metadata is tracked" and gone green with the gate never run.

Dropping `mapfile` also keeps the `OPERATIONS.md` block runnable on
macOS, whose `/bin/bash` is 3.2 and has no such builtin. That block
opens with `set -Eeuo pipefail`, so the failure would not have skipped
one check, it would have truncated every gate below it.

The list is `git ls-files -z` into `xargs -0`, since a bare `xargs`
splits on whitespace and honours quotes. Measured: a tracked
`.github/actions/my hook/action.yml` reaches the checker as two
arguments and the run exits 123, where `-0` passes it whole and exits 0.
`-0` is the form both GNU and BSD carry, where `-d` is GNU-only and
would break the macOS copy. The pathspecs are `:(top,glob)` so a run
from a subdirectory reads the same nine files rather than reporting a
silent clean over none.

## The eight findings the new gate raised on its first run

A gate that fails on the corpus it guards blocks every commit from the
moment it lands, per `GOVERNANCE.md`, so the tree is brought to green in
the same change. Eight inputs carried no `description`, which GitHub's
schema requires: `semver2` in `docker-prepare-default` and
`nuget-build-default`, and `assembly-version`,
`assembly-file-version` and `assembly-informational-version` in both
`dotnet-publish-default` and `nuget-build-default`. Each now describes
the NBGV output it threads and the MSBuild property it sets.
`dotnet-publish-default` passes its `assembly-version` as both
`AssemblyVersion` and `Version`, and its `semver2` reaches
`PackageVersion` alone, so those two say so rather than reading like
their `nuget-build-default` counterparts, where `semver2` is `Version`.

## Verification

The declared local gate set in `OPERATIONS.md` "Local Verification"
passes whole, and `docker_lint.py` is clean for actionlint,
markdownlint and editorconfig-checker. The new command was run at the
exact form the workflow and the local block use, over all nine tracked
action files, and its empty-list path was run in a scratch repository
carrying none. `workflow-ci-contract` regenerates into all three
distributions.


## Local review

Three adversarial passes, 22 findings, every one dispositioned. The
first pass disproved this change's own central claim: the draft said
actionlint reads no action file at all, and it does, opening a local
action through a workflow's `uses: ./<path>` to judge that caller's
`with:` block. Correcting the premise did not invalidate the gate, since
nothing before this reached the action file's own metadata, but the
justification was rewritten around what actionlint actually does.

Each later pass found a defect in the previous pass's fix. Round 2
replaced `mapfile` to stop a producer failure reading as an empty list,
and introduced an `xargs` quoting regression in doing so. Round 3
settled both with `git ls-files -z` into `xargs -0`.

## Fleet blast radius

Every `action.yml` the fleet carries outside this repository was fetched
and checked against the same builtin: `LanguageTags`, `aiopurpleair`,
`Financial-Modeling`, `HomeAutomation-Config`, `ESPHome-Config` and
`Blog` all pass, so no repository reds on its next pin bump. `Blog` and
`HomeAutomation-Config` carry composite actions and no `pyproject.toml`,
so both newly run `setup-uv` and one `uvx` resolve in their lint job
once they bump. That cost is intended rather than incidental.

## Known stale, deliberately untouched

`validate-task.yml`'s file header and `docs/reusable-workflows.md` both
enumerate the lint job's checks and neither names this one. Both are
comment lines, which `prose_lint.py`'s `comment-added` rule refuses on a
change that edits them unless the pull request says comments are wanted.
Left for that decision rather than edited here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Copilot AI lite review requested due to automatic review settings September 18, 2026 21:56
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 45e45562-dad9-4927-a625-0bc62a8715c0

📥 Commits

Reviewing files that changed from the base of the PR and between 8c0f7c1 and d0e722f.

⛔ Files ignored due to path filters (9)
  • .claude-plugin/fleet-skills/.source-digests/repo-worktree is excluded by !.claude-plugin/fleet-skills/**
  • .claude-plugin/fleet-skills/.source-digests/resync-a-repo is excluded by !.claude-plugin/fleet-skills/**
  • .claude-plugin/fleet-skills/.source-digests/workflow-ci-contract is excluded by !.claude-plugin/fleet-skills/**
  • .claude-plugin/fleet-skills/skills/repo-worktree/SKILL.md is excluded by !.claude-plugin/fleet-skills/**
  • .claude-plugin/fleet-skills/skills/resync-a-repo/SKILL.md is excluded by !.claude-plugin/fleet-skills/**
  • .claude-plugin/fleet-skills/skills/workflow-ci-contract/SKILL.md is excluded by !.claude-plugin/fleet-skills/**
  • .github/skills/repo-worktree/SKILL.md is excluded by !.github/skills/**
  • .github/skills/resync-a-repo/SKILL.md is excluded by !.github/skills/**
  • .github/skills/workflow-ci-contract/SKILL.md is excluded by !.github/skills/**
📒 Files selected for processing (12)
  • .agents/skills/repo-worktree/SKILL.md
  • .agents/skills/resync-a-repo/SKILL.md
  • .agents/skills/workflow-ci-contract/SKILL.md
  • .github/actions/docker-prepare-default/action.yml
  • .github/actions/dotnet-publish-default/action.yml
  • .github/actions/nuget-build-default/action.yml
  • .github/workflows/validate-task.yml
  • GOVERNANCE.md
  • OPERATIONS.md
  • docs/reusable-workflows.md
  • host-setup/linux/README.md
  • host-setup/windows/README.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ptr727

ptr727 commented Sep 18, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Two newly edited canonical skill statements are inaccurate and could mislead readers about actionlint coverage and the correct base-branch to restore in main-only tasks.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Low severity

Open (2)
What changed in this PR

This PR promotes the fixes recorded in #1155 by updating carried procedural text (worktree and resync guidance, repository layout docs) and by adding a CI/local gate that validates composite-action metadata (.github/actions/**/action.y{a,}ml) against GitHub’s action-metadata schema.

Changes:

  • Add composite-action schema validation via check-jsonschema (CI + local verification), and document its scope/limitations.
  • Update carried procedures and governance docs (repo-worktree continuation rules, resync audit invocations, repository layout, reusable-workflow docs).
  • Fix composite-action input metadata by adding required description fields.
File Description
OPERATIONS.md Adds local verification command to schema-check tracked composite actions.
host-setup/​windows/​README.md Documents that check-jsonschema is intentionally not installed natively.
host-setup/​linux/​README.md Documents that check-jsonschema is intentionally not installed natively.
GOVERNANCE.md Updates CI tooling description and expands repository layout entries (including Skills trees).
docs/​reusable-workflows.md Adjusts workflow documentation comment about target path lists.
.github/​workflows/​validate-task.yml Adds CI step to schema-validate composite actions and ensures uv is set up when needed.
.github/​skills/​workflow-ci-contract/​SKILL.md Regenerated skill distribution copy for workflow CI contract guidance.
.github/​skills/​resync-a-repo/​SKILL.md Regenerated skill distribution copy for resync guidance.
.github/​skills/​repo-worktree/​SKILL.md Regenerated skill distribution copy for repo worktree guidance.
.github/​actions/​nuget-build-default/​action.yml Adds missing input descriptions to satisfy action-metadata schema.
.github/​actions/​dotnet-publish-default/​action.yml Adds/adjusts input descriptions to satisfy action-metadata schema.
.github/​actions/​docker-prepare-default/​action.yml Adds missing input description to satisfy action-metadata schema.
.claude-plugin/​fleet-skills/​skills/​workflow-ci-contract/​SKILL.md Regenerated Claude plugin skill copy for workflow CI contract guidance.
.claude-plugin/​fleet-skills/​skills/​resync-a-repo/​SKILL.md Regenerated Claude plugin skill copy for resync guidance.
.claude-plugin/​fleet-skills/​skills/​repo-worktree/​SKILL.md Regenerated Claude plugin skill copy for repo worktree guidance.
.claude-plugin/​fleet-skills/​.source-digests/​workflow-ci-contract Updates digest tracking the skill source revision.
.claude-plugin/​fleet-skills/​.source-digests/​resync-a-repo Updates digest tracking the skill source revision.
.claude-plugin/​fleet-skills/​.source-digests/​repo-worktree Updates digest tracking the skill source revision.
.agents/​skills/​workflow-ci-contract/​SKILL.md Canonical skill source updated with composite-action schema-check guidance.
.agents/​skills/​resync-a-repo/​SKILL.md Canonical skill source updated to use explicit python3 audit invocations and --branch guidance.
.agents/​skills/​repo-worktree/​SKILL.md Canonical skill source updated to resolve base-clone continuation conflict and clarify continuation handling.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .agents/skills/repo-worktree/SKILL.md Resolved
@ptr727
ptr727 merged commit bfc70fb into main Sep 18, 2026
9 checks passed
ptr727 added a commit that referenced this pull request Sep 19, 2026
Copilot's reviews here now arrive in a second body format, identified by
the `<!-- ccr-overview-v2 -->` marker it opens with. The first review in
it named three markers `scripts/pr_review.py` had no spelling for, so
`status` exited 43 and no Copilot-reviewed pull request could close its
review loop. That exit is the contract working, and the remedy it names
is this reader.

## What the format changes

Its overview heading is `## Copilot review overview` rather than `##
Pull request overview`. It wraps each `<summary>` in `<strong>`, where
the first format wrapped none. It states its effort level and its
finding total on bare bold lines rather than as `Review details`
bullets, and it has no `Review details` section at all. It enumerates
each finding it opened a thread for as a link to that thread's own
comment anchor, under an `Open (N)` summary, and it carries a change
summary beside that.

## What this reads

The three blocked markers are vetted. Emphasis tags around a marker are
dropped before comparison rather than vetted with it, on the reasoning
the verdict headings already drop their colored circle: markup that
changes under an unchanged section is the cheapest drift there is.

`effort=` reads either spelling. Reading only the bullet left every
round in the new format printing `effort=unknown` over a body that
states the level outright, which is a reading lost rather than one
refused.

`overview=T/M` is new. `T` is the finding total the round states in its
overview preamble, `?` where no total is found there. `M` is the number
of review threads that round opened. A total larger than the thread
count is findings raised where polling threads cannot see them, and a
`FINDINGS WITH NO THREAD` block follows naming the shortfall. That is
what `suppressed=` reads in the first format, and the one body read in
this format carries no `Suppressed comments` heading for it to find. No
exit code rides on it, the same as `suppressed=` and `cr_outside_diff=`.

## Why `M` comes from the API

This is the part worth reviewing hardest, because six earlier attempts
read `M` out of the review body's own enumeration and four of them
shipped a false green: a shortfall of zero over a body that withheld
findings, because something that was not an enumeration entry got
counted as one. In order, those readings counted every anchor in the
body, then anchors inside the `Open (N)` region, then anchors on any
list item, then anchors on top-level list items, then entries grouped by
indent with the section ended by tag depth. Each was locally correct and
each moved the defect: a prose back-reference, a change-summary link, a
nested sub-bullet, a back-reference on the entry line, a list inside an
entry's collapsed detail.

Telling those apart needs each list marker's own content column and each
HTML block's own extent, which is a Markdown parser rather than a line
scan.

The count was never in the prose. The anchor each entry links is the
database id of that thread's own comment, so the threads the round
opened are the same set the enumeration names, already structured.
Confirmed against the live round that raised this: its two anchors are
exactly the two thread comment ids the API returns. `Q_FULL` gained a
review id and each thread's opening review to link them.

## What is stated as unmeasured, and why

The equivalence above holds while the round's enumeration lists what
that round raised. A format listing findings still open from earlier
rounds would state a total the thread count undercounts, printing a
standing shortfall on every round after the first. One round of one body
cannot settle that, and the code says so rather than asserting it. A
shortfall is therefore confirmed against the review body rather than
acted on from the number, and so is a `?`.

A thread past the hundred `reviewThreads` reads would also have counted
in `M`, which overstates the shortfall. `threads=` already carries the
trailing `+` saying the page was cut.

## What this deliberately does not do

The anchors are not used to select a thread. `reply --match` selects on
the finding's own words because that is what a caller has to hand, and
mapping an anchor back to a thread would need the thread query to carry
comment ids for that purpose. Nothing measured says the anchor would
select better.

The metadata bullet pattern stays bullet-anchored. Dropping the bullet
reads this format's own `**Changes:**` prose label as metadata and
blocks on it, so the two bare lines that carry a reading have their own
patterns instead.

That format states its file coverage inconsistently, which this pull
request's own review demonstrated: the round on #1687 carried the
`fleet-review` marker the fleet's carried `code-review` instructions ask
for, and the round on this pull request, whose head carries those same
instructions, carried no coverage statement at all and read as exit 45,
`COVERAGE_IS_UNSTATED`. That is the honest reading of a round that
stated none rather than a gap introduced here.

## Verification

Against the live pull request that raised this, `status` moves from
`shapes=UNRECOGNIZED` with three listed markers and `effort=unknown
effort_source=unknown` to `shapes=ok`, `effort=lite
effort_source=explicit` and `overview=2/2`. Five first-format pull
requests read identically before and after, carrying no `overview=`
field.

370 tests. Twenty mutations across every guard on this branch, all
killed, each by the case whose name claims it. Every commit after the
first two answers a review pass, local or hosted: the same reader was
rebuilt five times because the first four mechanisms each hid a finding.

The `comments` label is on this pull request because the prose gate
reports a `comment-added` line for every rationale line this change adds
or edits, this file's convention being a rationale block per constant.

Fixes #1688
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