Skip to content

ci: tag-on-merge via push-to-main (replace dead closed trigger + flaky cron) - #8

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/tag-on-merge-push-trigger
Aug 22, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/tag-on-merge-push-trigger

Conversation

@atrawog

@atrawog atrawog commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the tag-on-merge triggers with a proper event-driven implementation. The dispatcher now fires on push to main — the event that IS the squash-merge — instead of relying on a dead pull_request: closed trigger and GitHub's best-effort cron.

Full RCA — why tag delivery was irregular (8 steps):

  1. Expected: every merged PR gets a CalVer tag + CHANGELOG promptly (pull_request: closed fires at merge; */15 cron is a backstop).
  2. Actual (measured): 17 consecutive cron runs delivered with intervals of 39, 25, 32, 28, 31, 27, 36, 26, 36, 22, 44, 25, 29, 21, 35, 28 min — never once on the 15-min grid (avg ~30). PR fix: escape backticks in umbrella-gates.ts template literal #3's tag landed 4+ hours late; PR fix: escape backticks in umbrella-gates rules template (pi extension parse error) #7's tag (v2026.234.2108) was still missing 30+ min after the 21:08:33Z merge. Zero pull_request-event runs in the workflow's entire history (API-confirmed, 4 merges since the trigger was added in PR refactor: drop CHANGELOG placeholder, simplify workflows, add dotgithub submodule #4). The earlier workflow_run design died 15× in a row with startup_failure (~12:12–12:51Z).
  3. Mechanism: GitHub Actions cron delivery is best-effort with no SLA ("schedule events can be delayed during high load" — documented; this org runs heavy AI validator workflows). The closed trigger never created a run in this repo. The workflow_run attempt failed at startup (workflow-file issue). The push trigger demonstrably fires — verify.yml's push run landed 21s after PR chore: sync all submodule pins; spec no longer charly-pinned #6's merge push (17:36:30 → 17:36:51).
  4. Missed control: the dispatcher's trigger selection. The org's reusable tag-on-merge logic is correct and idempotent; the failure was entirely in which event the umbrella's dispatcher listened for.
  5. Blast radius: every merged PR (here and in every repo carrying this dispatcher) got tag+CHANGELOG 20 min–4+ h late; under worse cron load, tags would be skipped indefinitely — a defect per the rulebook.
  6. Root cause: the only functioning trigger was GitHub's unreliable cron; the deterministic merge-time event — the push to main — was never used.
  7. Root fix: trigger on push: branches: [main] (this PR). Event-driven, ~20s latency (proven), no cron, no dead closed-event dependence. The reusable sweep is idempotent — the CHANGELOG bot's own push re-triggers a cheap no-op sweep.
  8. Documented: this body is the record; the file header carries the trigger-selection rationale.

Self-validation on merge: when this PR merges, the new push trigger fires tag-on-merge immediately, which will backfill PR #7's missing tag v2026.234.2108 + CHANGELOG/2026.234.2108.md in the same sweep that tags this PR — an end-to-end live proof of the fix.

How tested

  1. Workflow file structure (YAML valid; GitHub uses YAML 1.2 where on is a string key — the PyYAML 1.1 boolean quirk below is a parser artifact, not a file defect):
$ python3 -c "import yaml; d=yaml.safe_load(open('.github/workflows/tag-on-merge.yml')); print(d.get(True)); print(list(d['jobs'].keys())); print(list(d['jobs']['tag'].keys()))"
{'push': {'branches': ['main']}}
['tag']
['uses', 'secrets']
  1. R10 — gates on the final committed tree (feat/tag-on-merge-push-trigger @ 10910e9):
$ task verify
verify-pins: OK — 23 submodules, policy B holds
task: [verify] node --disable-warning=ExperimentalWarning scripts/check-umbrella-gates-syntax.mjs
OK: .../.pi/extensions/umbrella-gates.ts parses (node type-strip pass)

$ task harness
check-harness-parity: OK — 6 shared harness files identical to charly/
  1. Trigger-reliability evidence (the RCA's load-bearing data):
$ gh api repos/opencharly/opencharly/actions/workflows/tag-on-merge.yml/runs --paginate \
    -q '.workflow_runs[] | select(.event=="pull_request") | .id'
(empty — the closed trigger never fired a single run, 7 merges)

$ gh run list --workflow=tag-on-merge.yml --limit 40
(17 schedule runs: gaps 21-44 min, never 15; 15 workflow_run runs: startup_failure; 0 pull_request)

$ gh api repos/opencharly/opencharly/actions/workflows/verify.yml/runs \
    -q '.workflow_runs[] | select(.event=="push") | .id'
32588260610 2026-08-22T17:36:51Z   <- 21s after PR #6's 17:36:30 merge push
(push events demonstrably fire; this is the trigger the fix adopts)
  1. Live end-to-end (post-merge): the merge of this PR fires the push trigger → the sweep backfills PR fix: escape backticks in umbrella-gates rules template (pi extension parse error) #7's tag + CHANGELOG and tags this PR. Verified after merge.

Rulebook compliance

Rule Applicability
R1 — RCA every anomaly Full 8-step RCA above; the missing v2026.234.2108 tag was root-caused to dead closed-trigger + best-effort cron before any change
R2 — no deferral The missing tag is fixed in this same change (the new trigger backfills it on merge)
R3 — no duplication One canonical trigger selection in the dispatcher; the org reusable workflow is the single tag/changelog implementation (unchanged)
R4 — no workarounds No sleeps/retries; replaced the cron workaround with the deterministic push event
R5 — delete legacy completely pull_request: closed + schedule triggers and the dead if: removed in the same commit; no stale references
R6 — git safety git status checked before branching; no force-push, no direct push to main
R7 — prove the gate task verify + task harness green (output pasted above)
R8 — harness parity .github/workflows/ is not in the parity map (HARNESS-PARITY.md covers .pi/.claude/.opencode/reasonix); task harness confirms the 6 shared files unchanged
R9 — artifact rebuild N/A — no deployed binary / target-image rebuild; the changed artifact is the CI workflow itself, exercised live on merge
R10 — fresh disposable proof Gates re-run on the committed tree; live proof deferred to the merge-time push event (item 4 above)

Change classification

  • Change class: bugfix (CI workflow — tag-on-merge dispatcher triggers)
  • Verification gate: task verify (R7) + live event evidence + post-merge self-validation
  • Attribution tier: analysed on a live system — trigger behavior measured live (run history + API queries, output retained); the full end-to-end gate (merge → tag → changelog) completes after merge, so fully tested and validated is claimed once the backfill is observed

Assisted-by: pi deepseek/deepseek-v4-flash (analysed on a live system)

…aky cron

RCA: tag delivery was driven entirely by GitHub's best-effort cron
(measured 21-44 min gaps vs the configured 15; PR #3's tag 4+ h late;
PR #7's tag still missing 30 min after merge). The pull_request:closed
trigger added in PR #4 never fired a single run (0 runs across 7 merges,
API-confirmed), and the earlier workflow_run design died 15x in a row
with startup_failure. The one trigger that demonstrably fires at merge
time is the push to main that IS the squash-merge (verify.yml push runs
arrive ~20s after each merge). Re-trigger on push: branches: [main];
the org reusable workflow is idempotent, so the CHANGELOG bot push
re-trigger is a cheap no-op sweep.
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 10910e9b6e16719cb14215d0e395f100376e4a10 (branch: feat/tag-on-merge-push-trigger)

Security screen: PASS — diff matches the described scope exactly (trigger replacement only); no scope mismatch, no secrets/exfiltration (permissions: contents: write, secrets: inherit, and the @main reusable-workflow ref are all unchanged context), no weakened guardrails (tag-on-merge dispatcher is not a security gate; the change makes tag delivery deterministic), no supply-chain changes.

Checklist: All applicable rules PASS or NA. Workflow-class change; the task verify + task harness pasted output is internally consistent with the diff (YAML parse matches on: push → branches: [main], jobs: [tag], [uses, secrets]; gate output on the committed tree), full 8-step RCA with measured data (17 cron runs 21–44 min gaps, zero pull_request runs, 15 workflow_run startup failures, 21s push latency — no forbidden flake/pre-existing framing), hard cutover in one atomic commit with legacy trigger/if: fully removed, no duplication/workarounds, no candies/schema/Go touched (ADE/SDD/R8/R9 N/A with reasons), tier analysed on a live system honestly conservative (live end-to-end observable only post-merge; mechanism statically verified and the adopted trigger's reliability is measured, not assumed), placement CORRECT (trigger selection in the dispatcher, shared logic stays in the org reusable workflow). No comments to intake; CI verify/validate still in_progress on this head — no failure, and no Go gates apply to a workflow-only change.

Verdict: PASS


deepseek.com/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 22, 2026 21:34
@github-actions
github-actions Bot merged commit e222762 into main Aug 22, 2026
2 checks passed
atrawog added a commit that referenced this pull request Aug 22, 2026
Keep the workflow_run + push design (this PR's corrected RCA); PR #8's
push-only trigger was based on a disproven premise and is superseded.
github-actions Bot pushed a commit that referenced this pull request Aug 22, 2026
…ge commits are run-suppressed) (#9)

* ci: tag-on-merge via push-to-main instead of dead closed trigger + flaky cron

RCA: tag delivery was driven entirely by GitHub's best-effort cron
(measured 21-44 min gaps vs the configured 15; PR #3's tag 4+ h late;
PR #7's tag still missing 30 min after merge). The pull_request:closed
trigger added in PR #4 never fired a single run (0 runs across 7 merges,
API-confirmed), and the earlier workflow_run design died 15x in a row
with startup_failure. The one trigger that demonstrably fires at merge
time is the push to main that IS the squash-merge (verify.yml push runs
arrive ~20s after each merge). Re-trigger on push: branches: [main];
the org reusable workflow is idempotent, so the CHANGELOG bot push
re-trigger is a cheap no-op sweep.

* ci: tag-on-merge on pr-validator completion + push (corrected RCA)

The push-only trigger shipped in #8 was based on a false premise: the
verify.yml 'push' runs cited were changelog-bot commits, not merge pushes.
Measured reality: native-auto-merge merges (actor app/github-actions) fire
their webhook events (visible in the public event stream) but GitHub Actions
creates ZERO workflow runs for them — platform-level run suppression. The
pull_request:closed trigger never fired either (0 runs in history). The only
trigger whose event delivery is proven is workflow_run on the pr-validator
run — the run that arms the auto-merge. This fires on its completion, waits
(bounded) for the squash merge to land, then runs the org's idempotent
tag-on-merge sweep. push remains as a secondary trigger for human/bot pushes
(which do create runs). No cron: measured delivery was 21-44 min late.
charly-auto-merge Bot added a commit that referenced this pull request Aug 22, 2026
@atrawog
atrawog deleted the feat/tag-on-merge-push-trigger branch August 22, 2026 22:06
atrawog added a commit that referenced this pull request Aug 30, 2026
`task sync`, not a hand-pin. Three gitlinks advance, and only three:

  charly           a8875f4b -> 0e4d026d   (its default branch, rolling)
  distro-omarchy   2f5e5c1b -> db2199a9   (policy B: exactly what charly pins)
  marketplace      db0593e5 -> 11380419   (its own default branch)

Policy B verified independently of the script rather than taken on trust: the new charly
pin's own box/omarchy gitlink is db2199a9, and that is what distro-omarchy is staged at. The
invariant is that a distro pin equals THE COMMIT CHARLY PINS — not that submodule's latest
main, which is a different and wrong comparison.

## What it brings in

  distro-omarchy #8  the omarchy beds assert through typed verbs, not shell
                 #9  upstream's system and cups acceptance suites, ported
  charly        #497 the plugin-vm pin that made `vm build omarchy-vm` possible at all
                #498 repins the four check verbs that gained fields
                #499 advances box/omarchy to the above
  marketplace   #255 projects the moved wl skills and the new omarchy skills

check-omarchy-iso-vm goes from 28 assertions to 52, and from 43 `command:` shell steps
across three beds to 4 in this one.

## How tested

    $ task verify
    check-policy-b: OK — 6 distro pins equal charly's gitlinks
    verify-pins: OK — 349 submodules, policy B holds
    [exit 0]

One thing worth recording, because it cost time and looks like a defect when it is not:
after `task sync` the umbrella reported `Mm charly` — a DIRTY submodule, which fails verify
and is a review blocker. It was not dirt. charly's own inner `box/omarchy` gitlink had moved
to db2199a9 in #499, while the working checkout was still at 2f5e5c1b, and
`git submodule update --recursive` could not move it until the inner clone had fetched the
new commit. `git -C charly/box/omarchy fetch origin main` then checking the pinned commit out
directly resolves it, after which charly is clean and verify passes.

The bed itself was proven on the exact distro-omarchy commit this pins, in
opencharly/distro-omarchy#9: `check-omarchy-iso-vm` (`disposable: true`) at
`PASS (steps=9)`, with check-live and check-live-rebuild both at
`52 steps: 52 passed, 0 failed, 0 skipped`.

Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3

Co-authored-by: atrawog <[email protected]>
github-actions Bot pushed a commit that referenced this pull request Sep 3, 2026
* chore(gitlinks): sync marketplace + plugin-deploy-vm pins to default-branch heads

The umbrella main (PR #119) already recorded most pins; these two moved after
it: plugin-deploy-vm (CHANGELOG/tag after the EnsureIsoGuestSSH merge PR #8)
and marketplace's default-branch head.

* docs: B14-compliant evidence — named live batch (distro-cachyos check-vm-clone bed, task 9, active sibling session) + its two exits; pasted current verify + pin match output
github-actions Bot pushed a commit that referenced this pull request Oct 9, 2026
…sh lifecycle, read-in-full before every push, session coordination, the validator only enforces (#448)

* docs(AGENTS)!: R0–R10 as the spine — fix it or file it, the commit/push lifecycle, read-in-full before every push, session coordination, the validator only enforces

AGENTS.md now puts the ground-truth rules right after R0, and every other section names the
rules it applies (`Enforces:`).

The rules are renumbered to a contiguous R1–R10:
- old R2 (finish the cutover) moves into Hard Cutover;
- old R8 (emitted artifacts) moves into R7;
- R4a and R7a become R4 and R8.

R1 gains the fix-it-or-file-it classification. A blocking finding is fixed in the change; a
non-blocking one is filed and listed under `## Filed issues`.

New sections:
- "What the validator checks" — one row per validator check id, mapped to its rule and its
  owning skill.
- "Commit, push, land" — one lifecycle: local commits are free, R10 runs on the committed
  tree, the first push opens a ready PR, and each review round appends one commit. It
  includes "Before every update push: read everything, fix everything".
- Part II #11 "Keep other sessions informed".

The duplicated Key Rules section and Part II #8's restatement are removed.

Umbrella-wide changes:
- Every rule citation is renumbered.
- The pi extension reads the injected rule sections from AGENTS.md instead of a hand-copied
  block (which had drifted).
- scripts/check-validator-rule-map.mjs asserts that the validator's check ids equal the
  AGENTS.md table, that every cited skill resolves, and that the committed rulebook equals
  the live AI_REVIEW_PROMPT.

Refs #446

Claude-Session: https://claude.ai/code/session_01Tu7zZjx8twjC3GmfAL5ss5
Assisted-by: Claude Code Anthropic Claude Opus 5.5 (analysed on a live system)

* fix(sync-pr-body): emit an R4 row, and assert every rule R0–R10 has one

When old R4 (no workarounds) became R3, the nightly sync body's Rulebook compliance list was
left with no R4 row (#448 review round 1, finding 2). It now emits
"R4 product before prose: N/A — a gitlink sync changes no documentation and routes around no
defect". The script's --self-test asserts that every rule R0–R10 has a row. Removing the R4
line makes it fail with "the Rulebook compliance section has no R4 row".

Refs #446

Claude-Session: https://claude.ai/code/session_01Tu7zZjx8twjC3GmfAL5ss5
Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
github-actions Bot pushed a commit that referenced this pull request Oct 22, 2026
…roduced (#568) (#571)

The pin was `behind` its remote: a leaf (`upstream:main`), so the advance was available now
and no producer had to move first. Advanced with `charly task sync` (the pin verb's
MODE=bump) in this session's own worktree.

  layer-openclaw  567a33541c -> 3c1007a476

The commits it lands are the repo's own `fix(skills)!: the two skill bodies move to the repo
root` (#8) plus its tag-on-merge CHANGELOG: at the recorded pin the tree reads root 0 /
candy dirs 2, at the landed one root 2 / candy dirs 0.

`task sync` reported rc=1 and that is the charly#864/#917 guard, not this change: 427 of
431 pins have no checkout in a session worktree, so the verb advances what it can and
refuses to claim success. What it advanced is what matters, and the one line this branch
keeps is the single gitlink below.

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)

Co-authored-by: Andreas Trawoeger <[email protected]>
This was referenced Oct 22, 2026
github-actions Bot pushed a commit that referenced this pull request Nov 25, 2026
… releases land (#1274)

`charly task sync` on a tree current with origin/main (7f11b25): 74 leaf
submodules rolled to their default-branch HEAD (11 moved), 321 leaf pins
advanced in the index (11 moved) — 22 pins total. The five distro-* pin_map
edges were re-pinned from charly's own gitlinks and did not move.

Two of the moves are what this wave is for (#1273):

  sdk                2bfea23e -> dd87eb2c   sdk#640 — a unit never runs as container root
  plugin-deploy-pod  c87f056c -> c10caae    #97 — a CDI device rides a keep-id unit via a
                                            derived devices-only spec; #95 writes the
                                            deploy entry's image before any overlay write

The other 20 travelled on the same mechanism, each a merged upstream PR:
charly #1275, layer-cdi #20, layer-vectorchord #13, marketplace #652,
plugin-enc #11, pod-charly-mcp #15, pod-immich #23, pod-qwen3-tts #15/#13,
spec #440, plus eleven unmaterialized paths advanced in the index
(layer-devops-tools #8, layer-ollama-cuda #11, layer-ollama-rocm #9,
layer-pre-commit #9, layer-versatiles-style #7, pod-airflow #15,
pod-android-emulator-layer #21, pod-appium-server #9, pod-dbus #8,
pod-jupyter-ml #15, pod-pmtiles-viewer #7).

The plugin-deploy-pod advance moved engineDefaultRuntime from engine_ops.go:139-146 to
129-136, out from under the citation DESIGN A.13 records for "containerd namespace per
deployment" (design/dulling.tsv). The row is re-anchored to the construct's new range and
design/cite-baseline.tsv regenerated for that one row; the construct read at the new pin is
the same one, and the regenerated baseline changes no other row.

Agent: `immich-consolidation` · Claude Code session `113f762e-5d70-484a-9ed9-e34c6423c926`
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
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