Skip to content

docs(contrail-gh): document surface-diff tripwire and version tagging - #52

Merged
atdr merged 3 commits into
mainfrom
docs/surface-tripwire-and-tagging
Sep 8, 2026
Merged

docs(contrail-gh): document surface-diff tripwire and version tagging#52
atdr merged 3 commits into
mainfrom
docs/surface-tripwire-and-tagging

Conversation

@atdr

@atdr atdr commented Sep 8, 2026

Copy link
Copy Markdown
Owner

What changed

Documents a surface-diff tripwire and a version-tagging scheme for
atdr/contrail-gh, contrail's companion template repo. This PR is docs-only —
the mechanism itself (surface-check.yml, tag-pin.yml, contrail-surface.json)
lands in a separate atdr/contrail-gh PR, which this doc describes and links to.

Why

Passport's new passport CLI subcommand slipped past docs/contrail-gh.md's
table because nothing mechanically flagged that contrail's public surface had
changed — reviewers had to remember to check by hand. This documents the fix:
contrail-gh's check-template.yml/check-instance.yml will diff CLI subcommands
and registry ids (importers/providers/storages/raw-logs) against a checked-in
contrail-surface.json on every pin-bump PR, and tag-pin.yml tags minor/major
bumps as vX.Y.Z (never patch-only, since bump-minor-pre-major /
bump-patch-for-minor-pre-major already make that split reliably mean
"feature/breaking" vs. "pure fix" while contrail is pre-1.0). Also rewords the "A
release is cut" table row, which previously implied merging the Dependabot PR was
sufficient on its own — it's the trigger, not the whole story.

Checks

  • ./venv/bin/ruff check . and ./venv/bin/ruff format . — no Python changed
  • ./venv/bin/pytest -q — no Python changed
  • Docs updated in this PR (it is the doc)
  • No behaviour changed, nothing to test
  • Skimmed gh issue list; none of the open issues touch this change

Test plan

  • npx prettier@3.9.6 --write docs/contrail-gh.md — ran via pre-commit hook,
    no formatting issues remained
  • npx markdownlint-cli2 docs/contrail-gh.md — 0 issues
  • Read the rendered file end-to-end to confirm the new table row, paragraph,
    and section read coherently with the existing doc

🤖 Generated with Claude Code

https://claude.ai/code/session_01X6VSeYrwoBr5FU8ZiwVDTn

atdr and others added 2 commits September 8, 2026 11:17
Passport's new CLI subcommand slipped past docs/contrail-gh.md's table
because nothing mechanically flagged that contrail's public surface
had changed. This documents the contrail-gh-side fix: surface-check.yml
diffs subcommands and registry ids against a checked-in
contrail-surface.json on every pin-bump PR, and tag-pin.yml tags
minor/major bumps as vX.Y.Z (never patch-only, since
bump-minor-pre-major already makes that split meaningful pre-1.0).

Also rewords the "A release is cut" table row, which previously implied
merging the Dependabot PR was sufficient on its own.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X6VSeYrwoBr5FU8ZiwVDTn
The recipe imported RAW_LOGS and STORAGES unconditionally, which don't
exist in contrail 0.4.0, the version contrail-gh's requirements.txt
currently pins. Mirror surface-check.yml's optional_import so the
recipe produces the same null values the CI check and the committed
baseline already expect, instead of an ImportError.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiQX66jnRTAVwaYrBF7vQV
@atdr

atdr commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

Fixed a bug a review turned up in the contrail-surface.json regen recipe above: it imported RAW_LOGS and STORAGES unconditionally, which don't exist in contrail 0.4.0, the version contrail-gh currently pins. Following the recipe as written against that pin would ImportError instead of producing the null values the committed baseline (and surface-check.yml) already expect.

e73f433 mirrors surface-check.yml's optional_import helper in the recipe so it behaves the same way CI does against an older pin.

One row lumped CLI subcommands together with importer/provider/storage/
raw-log ids under identical guidance, but they don't share a default
posture: importers and providers should default to being scaffolded
(an env var, a directory, a gitignore/guard if file-based) so a new
source is as easy as possible to adopt; storages and raw-logs need the
same wiring instinct but no repo-tree scaffolding by default, since
they're output choices rather than data-source choices; CLI subcommands
get no default at all -- Passport deserved active promotion, a
hypothetical diagnostic flag would deserve none, and the table can't
tell those apart in one shared line. Matches the per-key guidance just
added to surface-check.yml in atdr/contrail-gh#14.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X6VSeYrwoBr5FU8ZiwVDTn
@atdr

atdr commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

Pushed a follow-up commit (c0f1ee2) splitting the combined table row into three, to match the per-key guidance just added to surface-check.yml in contrail-gh#14:

  • importer/emissions-provider id → default posture is "scaffold it" (env var wiring at minimum, directory/gitignore/guard if file-based)
  • storage/raw-log id → same "wire it" instinct, but no repo-tree scaffolding by default
  • CLI subcommand → no default posture at all — read what it does before deciding whether it needs template reaction (Passport is the worked example; a purely internal/diagnostic command wouldn't need one)

Reasoning: a single shared row treated a Passport-style feature the same as an internal registry becoming visible, which doesn't reflect how differently those should actually be handled. Formatted/linted clean (prettier, markdownlint-cli2).

@atdr
atdr merged commit c28f7ff into main Sep 8, 2026
9 checks passed
@atdr
atdr deleted the docs/surface-tripwire-and-tagging branch September 8, 2026 20:04
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