Skip to content

feat(baselines): generate the required floor without letting it shrink silently - #270

Open
Alan-TheGentleman wants to merge 3 commits into
feat/release-assets-windowsfrom
feat/release-artifact-generators
Open

feat(baselines): generate the required floor without letting it shrink silently#270
Alan-TheGentleman wants to merge 3 commits into
feat/release-assets-windowsfrom
feat/release-artifact-generators

Conversation

@Alan-TheGentleman

Copy link
Copy Markdown
Collaborator

Fifth slice of the consumer chain, stacked on #269.

The paradox, and how it resolves

The spec wants REQUIRED_* generated. The plan wants the floor frozen, so a removal stays visible. Those read as contradictory.

Monotone regeneration resolves it. --write may ADD a required name. A name disappearing from the snapshot's required block makes generation fail naming it, and demands a hand-authored deletion from the generated file. A floor that silently follows the provider downward is not a floor.

The mechanism is a self-referential fixed point: the generator regex-parses its own previously checked-in output as the baseline and unions it with the current snapshot. Un-requiring something needs a visible edit to a file marked "do not edit" — and that diff is the review signal.

Proven twice: as a pure-function test, and as a real subprocess run against a shrunk snapshot fixture, which fails with the exact operation name and the instruction to hand-edit.

Same discipline for mandatory features: an advertised one absent from Pi's supported set fails naming it and is never auto-added. Pi's supported set is a decision, not a mirror.

The 12 frozen rows moved verbatim

They describe already-released immutable versions and must never be recomputed. Their explanatory prose survives as notes rather than being dropped.

Two interpretations flagged rather than quietly closed

The task text says 13 of 17 capability flags map from the snapshot via review.<op>. In practice only 5 map by exact operation name. The other 8 predate the negotiated contract and legitimately carry forward from history. That gap is documented rather than papered over with a lookup that would look derived but wouldn't be.

REQUIRED_SCHEMAS and the mandatory-feature constants stay hand-authored. The semantic snapshot mirror carries no schemas array, and mandatory support is a client-code decision rather than something to mirror.

Both deserve a reviewer's judgement, which is why they are here rather than in a commit footnote.

Tests

19 new, all green. The 7 pre-existing capability-contract regression locks still pass. --check clean, check:transaction-runner clean with six generated modules now in sync.

Full suite 1102 pass, 1 fail — the environmental no-network failure documented since #267, confirmed identical against the unmodified parent tip.

Rollback

Delete the five new files, revert the two library imports (the original hand-authored constants are fully preserved in the diff's removed lines), the sources entry, the CI step and the package scripts. No decoder, sync, installer or assets trust code is touched.

…NTRACTS from the semantic snapshot

Replace the hand-authored REQUIRED_OPERATIONS/REQUIRED_GATES/REQUIRED_PROJECTIONS
and the 12-row NATIVE_CLI_CONTRACTS capability table with scripts/build-gentle-ai-baselines.mjs
(--write/--check), which derives them from the checked-in semantic capability
snapshot and capabilities/native-cli-history.json. The required floors regenerate
monotonically -- a name can only be added; a name disappearing from the snapshot
fails generation naming it, and un-requiring it needs a visible hand edit to the
checked-in generated file. Mandatory-feature exactness and unmapped-operation
detection are the same discipline applied to the two other places the design
calls out: a mandatory feature Pi has no decoder for is never auto-added, and a
provider operation with no NativeCliCapability column stops generation with an
actionable message instead of silently appearing supported.

The 12 pre-existing capability rows move verbatim into
capabilities/native-cli-history.json; the currently pinned version's row is
recomputed fresh each run and cross-checked against its own historical record,
which self-verifies the generator against known-good data (--write reproduces
the original 12 rows byte-identical).
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 23731a70-4977-44af-b783-1dacbb76c745

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

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