ci: gate merges on the test check, and verify the merge result - #238
Conversation
A push to `main` is what a merge looks like from Actions' side, so every merged PR now re-runs lint, the suite, and the build-identity check. This is NOT the redundant run it was once called. A `pull_request` run tests the PR head; a `push` run tests `main` after the merge landed. Those differ whenever two independently-green branches conflict semantically -- each passes alone, the merge of them does not, and only the post-merge run can see it. It runs AFTER the merge and so cannot block one; that needs a `pull_request` trigger plus a ruleset that actually matches `main` and requires the `test` context. The comment records why both halves have to move together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`pull_request` is restored because it is what makes this job report a status named `test` on a PR, and the `main` ruleset now REQUIRES that context before a merge is allowed (#236). The trigger and the ruleset are a matched pair. So the two automatic triggers do different jobs: `pull_request` GATES the merge, `push: [main]` VERIFIES the tree that resulted from it. The second is not redundant -- two independently-green branches can conflict semantically, and only the post-merge run observes that. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test check, and verify the merge result
|
Amended: added on:
pull_request:
push:
branches: [main]
workflow_dispatch:This PR is now half of the #236 fix and must merge first. The other half — repointing the The context string is
|
…the CTS scoring fix (#241) A minor bump, not a patch, for three reasons that each require operator action or change behaviour the deployment is currently relying on. SCHEMA. `SCHEMA_VERSION` goes 9 -> 10 (#223). Both deployed databases are at 9 and must be migrated before this build can use them. BEHAVIOUR REQUIRING OPERATOR ACTION. #223 adds a second attested claim -- what CONTRACT a venue listing is, not only what the underlying asset is. It fails closed with no backfill, deliberately, so after this lands `keel assets screen` REJECTS every product with `instrument_wrapper: UNATTESTED` until `keel assets attest-instrument` is run once per product. Live trading is unaffected: rail 1 gates buys on `config.allowlist`, not on the screen. LIVE SCORING CHANGED. #227 fixed `is_round_number`, which returned True for every 2dp-quoted price and so handed BTC/ETH/PAXG a free CTS point on every bar. Scores on those three assets are genuinely lower under this build than under 0.5.7. Also ships: the Robinhood crypto adapter behind the broker port (#216/#218/#222/#229, not wired to the live path), the TUI activity feed (#235/#237), the CTS factor collinearity study (#224), `Preview.synthetic` at the confirm gate (#221), rail 9 seeing a bracket's own stop (#212), and CI gating merges on the `test` check (#234/#238). Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds
push: branches: [main]back toci.yml, keepingworkflow_dispatch.Why this is not the redundant run it was called in #200
#200 removed this trigger on the grounds that it re-ran content the
pull_requestrun had already passed. That reasoning held whilepull_requeststill existed. It does not now — #234 removed it, so nothing automatic runs at all.It was also incomplete even then. A
pull_requestrun tests the PR head; apushrun testsmainafter the merge landed. Those diverge whenever two independently-green branches conflict semantically — each passes alone, the merge of them does not. Only the post-merge run observes the tree that actually resulted.What this does and does not buy
Does: every merge is verified within minutes, against the real post-merge tree. Given three PRs in this repo have merged mid-flight while an agent was still pushing to them (#192, #218, #235), time-to-discovery is the practical problem, and this addresses it.
Does not: block a merge. It runs after. Blocking needs two things this repo lacks, and they must move together:
pull_requesttrigger, andmainand requires thetestcontext.The ruleset named
mainexists but matches no refs (ref_name.includeis empty;GET /rules/branches/mainreturns[]), and its required contexts ("Lint, Unit tests, Build","Integration Tests") match no job here. Pointing it atmainwithout fixing the contexts would block every PR forever on checks that can never report. Tracked in #236.release.ymlis unchanged and remains the gate that matters for money — it re-runsruff+pytestbefore building an artifact, so a redmainstill cannot ship.Concurrency
Unchanged (
ci-${{ github.ref }}). The comment is updated: back-to-back merges tomainnow cancel the older run, which is correct — the newestmainis the only one whose result still matters.Validation
{'push': {'branches': ['main']}, 'workflow_dispatch': None}(checked viad[True], since PyYAML follows YAML 1.1 where barewordonis boolean).actionlintclean, exit 0.