CI guards (#1, #3) + schema-reference docs (#4.1, #4.3) - #16
Merged
Conversation
…ions doc, softer invariant nudge Closes #1, #3, and #4 sub-items 1 and 3. - #1: guard that release tags are cut from main. release.yml's v* trigger can't be branch-filtered, so add a runtime step that fails unless the tagged commit is contained in main's history (git merge-base --is-ancestor). - #3: add a lightweight action-version workflow that fails when action.yml's pinned `version` default drifts from the latest published release. Runs on action.yml changes and weekly, catching a forgotten post-release bump. - #4.1: document what the format deliberately leaves out (aggregates, value objects, domain events, bounded contexts) in the schema reference. - #4.3: soften the "entity has no invariants" completeness message and document that genuinely rule-free entities are fine, so newcomers stop inventing filler invariants. Signed-off-by: Joe Beda <joe@stacklok.com>
… guard Round 1 review (Opus) flagged that 'gh release view ... || true' masks a genuine gh API failure as 'no release yet', silently no-opping the drift guard. Use 'gh release list' instead: empty array (exit 0) means no releases, non-zero exit on a real error fails the step under set -e. Signed-off-by: Joe Beda <joe@stacklok.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four small, independent improvements. First run through the new review-loop process (
.claude/rules/agent-workflow.md): implemented inline, one adversarial review round (Opus), one reliability fix applied, round record kept in.scratch/reviews/(gitignored).Closes #1.
Closes #3.
Addresses #4 — sub-items 1 and 3 only (the other five stay open).
#1 — release tags must be cut from main
release.yml'sv*trigger can't be branch-filtered, so a tag off any branch would fire a public release. Added a runtime guard right after the full-history checkout:git merge-base --is-ancestor "$GITHUB_SHA" FETCH_HEADfails the release unless the tagged commit is contained in main's history. Verified in review against a scratch repo: on-main (incl. main's tip) passes, off-main fails, no false-pass in the dangerous direction.#3 — action.yml version pin can't silently go stale
action.ymlpins amodelithrelease as itsversiondefault; bumping it post-release is a manual step nothing caught. New lightweightaction-version.ymlworkflow compares the pinned default (yq) against the latest release (gh) and fails on drift. Triggers:action.ymlchanges (PR + push to main) for fast feedback, plus a weekly schedule so a forgotten post-release bump is caught within ~7 days without needing anaction.ymlPR.Design note: chose the CI-gate over the auto-bump-PR option from the issue — simpler, no write permissions, and the failure mode (red check) is the reminder. Easily revisited later; not ADR-worthy.
#4.1 — document what the format deliberately leaves out
New "What this format deliberately leaves out" section in
docs/06-schema-reference.mdcovering aggregates, value objects, domain events, and bounded contexts — each with why it's out of scope and any roadmap pointer (value types → #11). Turns hidden gaps into a credibility signal for a DDD-literate reader. Verified against the schema/lint that none of these constructs actually exist.#4.3 — stop pressuring newcomers into filler invariants
Softened the "entity has no invariants" completeness message and added a note that genuinely rule-free entities are fine, so the warning reads as "check" not "fill". Message keeps the
has no invariantssubstring the lint test anchors on;go test ./internal/lint/passes.Review round
One reduced round (Opus reviewer). Only finding:
gh release view ... || truemasked a genuineghfailure as "no release yet", silently no-opping the guard (false-negative). Fixed by switching togh release list(empty on no-releases, non-zero on real error). Full record:.scratch/reviews/improve-ci-and-docs.md.No Go behavior changed beyond one diagnostic string;
go build+ lint tests green locally.🤖 Generated with Claude Code