Repository navigation
fix(ci): an untagged merge now reddens tag-on-merge and NAMES the PR - #289
Merged
Merged
Conversation
The sweep can leave a merged PR untagged in two ways, and neither was visible to
anyone but the person who happened to ask.
* SILENT: in sweep mode every per-PR failure is caught and downgraded to
`core.warning('... - continuing')`, so the step exits 0 with the merge
untagged. A GREEN sweep therefore does not mean "every merge is tagged"; it
means "no error escaped", which is a different sentence.
* FATAL: a transient 5xx or socket reset aborts the step before any tag is
written (#286's own failure, `HttpError: other side
closed` inside the listing read). The next step would be SKIPPED, so the
untagged merge stays unnamed even though the run is red.
This adds the missing control: a final step that asserts the post-condition of
BOTH paths -- every PR merged inside the sweep window resolves to a tag AT its
merge commit -- and fails naming the PR. The condition is `!cancelled()` rather
than `always()`: that is what makes it run after a FAILED step, while a
superseded run stays CANCELLED instead of turning red on a merge it never tried
to tag.
It derives no CalVer. It asks only whether each merge commit carries ANY tag, so
it cannot drift from the step's naming rules (root CalVer, the Go-module form,
the subdir module tag). An annotated tag is dereferenced to its commit;
comparing against the tag OBJECT would be a false negative for every annotated
tag in a repo that carries one.
The window is now ONE literal, the job's SWEEP_WINDOW_HOURS, read by both the
sweep and the detector. Two literals would let the detector judge a population
the sweep never acted on -- a green detector over merges nothing looked at. A
missing or non-numeric value fails the run instead of defaulting to an empty
window, which would report "nothing to tag" forever.
Coverage, executed offline (`scripts/tag-on-merge-assert_test.sh`, wired into
workflow-checks): it extracts the shipped step's text and runs THAT against a
mock `gh` which applies the step's own `--jq` filter, so the real filter is under
test. Four GREEN arms (lightweight tag; annotated tag dereferenced; a merge
outside the window; a closed-but-unmerged PR) and two RED arms which must fail
AND name the merge (no tag at all; a tag at a different commit). Two mutation
arms were run: the coverage goes red when the comparison is neutered -- a
detector that cannot fail is not a detector -- and when the step's condition is
removed.
Deliberately NOT in this change, and the reason is the rulebook rather than
effort: the retry half of #286. R3 forbids blind retries and sleeps; the control
that makes a persistent provider failure loud is the detector, and a retry can be
argued for separately once this shows how often the transient class fires. So
this change does not close #286.
Local gate: every offline workflow-checks script PASS (11/11); both workflows
parse; the shipped sweep JS was executed locally against stubs (window read from
SWEEP_WINDOW_HOURS and the tag emitted; an invalid value failed loud). The repo's
live gate (workflow-checks + the required validator) runs on the PR.
Refs #286
Refs opencharly/crabbox#40
Agent: containerd-crabbox-program
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
Co-authored-by: Andreas Trawoeger <[email protected]>
This was referenced Nov 9, 2026
Contributor
Review — PASSHead SHA: Security screen: PASS Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
github-actions Bot
pushed a commit
to opencharly/opencharly
that referenced
this pull request
Nov 9, 2026
#958) One `charly task sync` wave in a worktree off origin/main 5d9e744. Two pins moved, and each new value equals the ref its leaf intent (`upstream:main`) names, re-read from the remote rather than inferred: dotgithub bd1e195cadfce40e09719d99a16f7353e1aa27bd -> 3f1ad6cab29c5ba58ad13778e139f4f24da0fd2b plugin-tunnel e0edafce6c248f3bc80bb431f9e17f37d228eba7 -> ba69046fdbf88847a050e5b68e54f57b6a17c429 dotgithub moved because opencharly/.github merged the tag-on-merge assertion (opencharly/.github#289, squash 28a0b7151a88da81611edf5ba8b11c10dd17f61d, tag v2026.313.1651) plus its CHANGELOG commit. plugin-tunnel had squash-advanced on its own remote: `not-on-the-served-line`, which is an advance available now, not a divergence. R9: the binary that ran the wave and the gate was built IN this worktree (`charly/scripts/bootstrap-charly.sh`, `charly version 2026.313.1024`) from the tree's own charly checkout 68fc2a62 — the rebuild is the proof, because a CalVer stamp at build time cannot prove binary==source on its own. The wave did not move the charly pin, so the binary stayed valid for the gate. Gate on the committed tree: charly task verify -> 48 step(s), 0 failed, 0 skipped (exit 0) currency -> 0 of 409 pin(s) NOT current [409 cur] The gate log carries ONE line a reader should classify rather than skim: `WARNING: charly is a dev/worktree build (not installed at /usr/bin or /usr/local/bin); NOT loading the installed package's plugins`. That is the worktree-build NOTICE R9 requires — the gate must run a binary built from this tree, never a shared install — and not a gate warning: every step reports pass, 0 skipped. Two gitlinks staged, nothing else. No hand-pin. Agent: containerd-crabbox-program Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated) Co-authored-by: Andreas Trawoeger <[email protected]>
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 10, 2026
…ver write the source repo (#296) Clean successor to #295, which the validator auto-closed after five counting verdicts. The state is the same as that PR's final head — every finding from its five rounds is fixed here — carried as ONE commit on a branch off fresh `main`. TWO DEFECTS, AND THE P0 THEY EXPOSED. 1. P0 — the REUSABLE was replaced by a caller. The `#204` fleet reconcile copies the canonical CALLER template to `.github/workflows/tag-on-merge.yml` in every repo, including `opencharly/.github`, where that path is the REUSABLE every caller invokes. Commit 30139d6 wrote the caller over it: `workflow_call` 2 -> 0 and the #289 detector gone, so every `uses: opencharly/.github/.github/workflows/tag-on-merge.yml@main` in the org was calling a non-reusable workflow. This restores the file from 28a0b71 and adds the guard that should have existed: the SOURCE repo is skipped, never written. 2. The write bypassed the release chain. The reconcile PUTs to `main`, so nothing tags it — and a head that is untagged and not the `docs: add CHANGELOG …` commit above a tag fails `design-pintag` for every pin that advances to it (389 findings measured), while that control forbids RAISING its census. The write now captures the PUT's `.commit.sha`, derives the CalVer from that commit's own committer date, and mints the tag at it. THE FORM IS PER-REPO, mirroring the reusable: `sdk`, `spec` and `plugin-gh` get Go's module form `v0.<y><doy>.<hhmm>`, everything else the plain CalVer — a plain `v2026.…` on a proxy-consumed module is a major version needing a `/vN` path that no consumer could name. Gate on this tree: reconcile-tag-on-merge-callers_tag_test.sh PASS (6 properties) reconcile-tag-on-merge-callers_test.sh 17 passed, 0 failed org-ruleset_test.sh all assertions passed tag-on-merge-assert_test.sh green (it failed while the reusable was a caller) workflow_call in the restored reusable 2 RCA, the controls this PR produced, each from a round of the closed thread: * a pasted transcript must be REGENERATED after the last edit to the file that produces it — round 1 pasted a line the file could not print; * a limitation in the body is a finding to eliminate or file, never a substitute for the arm — round 2's "the mock cannot drive the repo name" was false, and `SOURCE_REPO=fixture` exercises the guard; * a test header is written LAST, by reading the arms — round 3's header claimed an idempotency arm that did not exist; * "the CalVer shape tag-on-merge uses" is THREE shapes, not one — round 4's module-form bug would have minted unusable tags on `sdk`, `spec` and `plugin-gh`. Agent: containerd-crabbox-program Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated) Co-authored-by: Andreas Trawoeger <[email protected]>
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.
An untagged merge is now loud:
tag-on-mergeends with a step that asserts every merged PR in its sweep window resolves to a tag at its merge commit, and fails naming the PR when one does not.opencharly/.github#286's own failure — the step dying inside a transient 5xx before it wrote anything — is covered too, because the assertion runs on a non-cancelled condition, i.e. after a failed step.Summary
The sweep could leave a merged PR untagged in two ways, and neither was visible to anyone but the person who happened to ask:
core.warningthat prints the error and logs— continuing, so the step exits 0 with the merge untagged. A green run therefore does not mean "every merge is tagged".#286's own evidence:HttpError: other side closedin the listing read). The next step would be skipped, so the untagged merge stays unnamed even though the run is red.The new step is the post-condition of both, and it derives no CalVer: it asks only whether each merge commit carries any tag, so it cannot drift from the naming rules in the step above (root CalVer, the Go-module form, the subdir module tag). An annotated tag is dereferenced to its commit — comparing against the tag object would be a false negative for every annotated tag in a repo that carries one.
The window is now one literal, the job's
SWEEP_WINDOW_HOURS, read by both the sweep and the detector. Two literals would let the detector judge a population the sweep never acted on. A missing or non-numeric value fails the run rather than defaulting to an empty window, which would report "nothing to tag" forever.How tested
The gate that owns this change is
workflow-checks(this repo's.github/workflows/workflow-checks.yml); this diff also has no runtime path outside it. Every offline step of that gate was run on the committed tree at head54915461397b32e23e7c7527de2fde12292e74fd(clean worktree):c3andc4print the line the detector emitted: the red arm names the merge, which is the whole property#286asks for. The rest of the gate, same tree:Plus
python3 scripts/check-action-runtimes.py --self-testandbash scripts/governance-reconcile.sh --self-test, both exit 0, and both changed workflows parse (yaml.safe_load).The coverage discriminates — two mutation arms, run on this tree and then reverted. A detector that cannot fail is not a detector, so the red arms are proved by making the shipped logic wrong:
The changed JS line executed, not merely parsed. The sweep's window expression is the only JS touched; the shipped script text was extracted and run under Node with stubs for the API it touches:
The harness itself is a local one-off (not committed): what it proves is that the shipped text computes its window from the env literal and fails loud on a bad value. The committed coverage is the extracted shell step, which is the new logic.
Stated, not hidden: the sweep's tag-creation path is not exercised end to end against a real GitHub API before merge; the first live proof is the first merge after this lands, whose
tag-on-mergerun now carries the assertion.Rulebook compliance
/charly-internals:repo-setupand/charly-internals:git-workfloware the two skills this repo's ownAGENTS.mdnames; both were read before the first edit, and this repo'sAGENTS.md("Modify this repo", "Landing") was read first.#286's own log (HttpError: other side closedin the listing read), the missed control is named in the workflow comment (acore.warningdowngrade, plus a skipped step on the fatal path), the blast radius is every repo carrying the caller, and the root fix is the assertion. No anomaly was filed away to land this.scripts/lib-org.sh(extract_step_run/extract_step_yaml) rather than a second awk. No CalVer logic is duplicated.24 * 3600 * 1000is replaced, not kept beside the new literal.feat/tag-on-merge-untagged-detectorofforigin/mainbd1e195; no force-push, no rewrite, nothing of another session's touched (the two open PRs in this repo,#287and#207, are on different files).ghis the test's stand-in for the API inside the coverage, and the shipped step calls the real API.disposable: truetarget applies to a GitHub Actions workflow; the change-class gate for this repo isworkflow-checks, run above, and the requiredcharly/pr-validatorruns on this PR.Filed issues
opencharly/.github#286— this PR implements its detector half and deliberately not the retry half (R3: no blind retries or sleeps). The issue stays OPEN carrying the retry, which this PR does not close.opencharly/crabbox#40— the same missing control from the consumer end, and its recorded root fix is this assertion. Its own residual is stated:crabbox#1merged before the caller existed, so no run at all fired and its 24h window has now expired — that one merge stays untagged, and the add-only backfill is the documented remedy. No consumer needs it: the umbrella pins crabbox at the merge commit.Change classification
CI control — one assertion step added to the org-wide reusable
tag-on-mergeworkflow, one test wired intoworkflow-checks, and the sweep window's literal named once at job level.Breaking change + rollback: none — the workflow gains a step and reads an env value it now declares itself; no caller changes, and no tag's name or target moves. Rollback is reverting this branch.
Refs #286
Refs opencharly/crabbox#40
Agent:
containerd-crabbox-program· session8b1c01cf-7f79-4a75-bff8-240415a06208Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)