Skip to content

fix(codeql): wake required jobs with the exchanged target app token - #2040

Open
seonghobae wants to merge 144 commits into
mainfrom
fix/codeql-wake-target-app-token
Open

fix(codeql): wake required jobs with the exchanged target app token#2040
seonghobae wants to merge 144 commits into
mainfrom
fix/codeql-wake-target-app-token

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Owner session: fast-mlsirm-commercialization

Outcome

Canonical combined successor for the central CodeQL producer/handler cycle, exact required-run recovery, strict head-envelope validation, and stacked-PR check admission.

  • Exact head: 6706c231ab06a3c91c43fdb5b989cfcd79fff593
  • Exact tree: 0f07c4e60f2e02fc60a0204a4cdfb0f42efbabc2
  • Base: protected main@7fd571dbcdbae6acf29d8f4ee704d7ba6297e4db
  • Compare: 144 ahead / 0 behind, 24-file combined delta
  • State: Ready/Proposed; Ready admits fresh review, while terminal exact-head checks and a qualifying independent approval remain merge gates

Root causes and repair

  1. A handler superseded after initial validation cannot publish a status: publication requires the second live PR/base/head validation to succeed.
  2. The proposed head-only compatibility context was unsafe because an old success could be reused after a same-head base or required-run change. The evidence-complete #1902 producer is integrated as the second parent, and the handler publishes only codeql-dispatch/<language>/<base_sha>.
  3. Publication requires the exact SARIF artifact upload to succeed and verifies the creator returned by the status API for the selected credential boundary.
  4. Producer receipts bind exact base/head/run, protected workflow source and title, actor, successful validation/required jobs, gate, SARIF, artifact, and response creator.
  5. One run-wide settlement owner revalidates live PR/base/head, exact required run/jobs, handler gates and nonexpired artifacts before one run-level rerun mutation.
  6. Live forward-only base advancement restarts the whole exact required run; rewritten/divergent bases fail closed.
  7. Raw nested pr_head types/schema and independently supplied legacy scalars must agree.
  8. The target App → PR_REVIEW_MERGE_TOKENOPENCODE_APPROVE_TOKEN → same-repository token fallback chain remains explicit and authenticated.
  9. Direct evidence authenticates handler runtime source against protected central .github/main, not against the target PR synthetic merge history; unprotected, rewritten, sibling, and unrelated sources fail closed.
  10. Destructive-boundary active-run refresh uses the same host-scoped Actions credential selector as cancellation, so a denied general read token cannot retain a stale central run when the central token can verify it.
  11. The stacked-PR security contract rejects both branches and branches-ignore filters.
  12. failed-mode dispatch sends one top-level required_jobs authority that the protected pre-cutover handler can consume; only whole-attempt all mode uses the nested envelope, preserving the ten-property limit.

Complete carryover and non-force lineage

This head completely carries the valid commits, tests, documentation, and requirements from #1902, #2004, #2043, and #2044. They remain open Proposed predecessors; none is closed or treated as delivered before ordinary integration.

Exact-tree verification

  • focused producer/handler/recovery contracts: 133 passed
  • scheduler and stacked-security contracts: 336 passed
  • full repository: 3088 passed, 1 skipped, 21 subtests passed
  • Deprecation Warning error mode: passed
  • git diff --check: passed
  • exact tree matched after Git Data publication (0f07c4e60f2e02fc60a0204a4cdfb0f42efbabc2)

Fresh exact-head hosted checks

Predecessor CodeQL run 34249195529 is terminal FAILURE. Exact handler run 34249932036 proved the cutover defect: protected main received the nested-only payload as SUPPLIED_REQUIRED_JOBS: null. That failure is not transferred to the new child.

The ordinary child generated a new exact-head generation:

Merge gates

Fresh exact-head terminal checks and a qualifying current-head independent approval remain mandatory. No predecessor check or review transfers. No merge, self-approval, auto-merge authorization, protection bypass, manual rerun, synthetic status, empty push, force push, destructive rebase, or Close was performed.

Summary by CodeRabbit

  • 새 기능

    • 모든 PR 기반 브랜치에서 Python 보안 및 런타임 품질 검사가 실행됩니다.
    • CodeQL이 PR의 베이스·헤드·생성 출처를 검증하고, 실패한 필수 검사를 전체 재실행합니다.
    • 스케줄러가 저장소별 자격 증명으로 Actions 실행을 조회·취소합니다.
  • 버그 수정

    • CodeQL 재실행과 상태 판정의 누락·오용 가능성을 줄였습니다.
    • 불완전하거나 모호한 SARIF 증거로 인한 잘못된 성공 판정을 방지합니다.
  • 문서

    • CodeQL 검증, 재실행, 자격 증명 및 PR 검사 범위 문서를 보강했습니다.

seonghobae and others added 30 commits September 5, 2026 16:34
Preserve the existing four-file rerun recovery delta without emitter or concurrency policy changes.

Local contract verification: 144 passed, 2 failed. Existing verdict-reader fixtures still expect the pre-pagination gh invocation; these files and the requester are unchanged from bf732f9. Workflow actionlint and diff checks passed. No hosted dispatch or push performed.

Signed-off-by: Seongho Bae <me@seonghobae.me>
Match exact gh arguments and page-shaped responses. Preserve trusted-publisher assertions and exercise second-page success and failure after a full page of forged statuses.

Signed-off-by: Seongho Bae <me@seonghobae.me>
Request PR state in GraphQL and preserve it in REST normalization. Reject missing state and empty or malformed heads before OpenCode dispatch, Strix dispatch, or Strix job rerun.

Preserve explicit positive fixtures and add fail-closed regressions. Focused RED: 17 failed, 19 passed; final scheduler regressions: 380 passed under both normal and GITHUB_ACTIONS=true environments with warnings treated as errors. No dispatch, permission, queue, or cancellation policy changes.

Signed-off-by: Seongho Bae <me@seonghobae.me>
Validate selected check, job, run, workflow and publisher before rerunning Strix. Preserve PR-target base-SHA executions through association and target-title checks; defer dispatch runs without authenticated target provenance.

Local mock-only regressions: 402 passed in normal and CI environments with warnings treated as errors. No token, permission, queue or cancellation changes.

Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Preserve the complete prior writer history while making the final tree authoritative from protected main plus only the five CodeQL recovery paths. Scheduler/Strix commits 951d0ec, 9bfe575, and fe64f24 are carried to their own successor branch; no valid delta is retired or force-updated.
Block terminal status publication and exact-job wake when SARIF upload does not succeed. Preserve existing finding verdicts and document the unresolved receipt boundary.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Compare already-fetched live base identity with event inputs before status consumption. Keep historical verdict provenance and artifact authority as unresolved follow-ups.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Supply the real base repository, ref and SHA required by the production dispatch shell. Preserve later-attempt redispatch coverage without weakening the live-base guard.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Merge exact 82ca0b8 into the handoff branch. Consolidate equivalent publication regressions and SARIF documentation while preserving live-base validation and rerun fixtures.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Seongho Bae <me@seonghobae.me>

Copy link
Copy Markdown
Contributor Author

Fresh Orgmetra consumer canary reproduces the remaining ordering defect on a new exact head; this is not a request for a no-op rerun.

  • consumer: ContextualWisdomLab/Orgmetra#51
  • protected base: eb9757f8649aaad026a9865508d9aad50c1a7a4f
  • exact head: 59993759523b9164ca098af55f05f5bdb3866298
  • required CodeQL run: 34270639102
  • CodeQL compatibility analysis (actions) job 102211461290: terminal FAILURE
  • CodeQL compatibility analysis (python) job 102211461435: terminal FAILURE
  • both read verdict=pending and failed enforcement
  • only afterward did Dispatch current-head CodeQL scan job 102212058192 complete SUCCESS
  • current commit statuses still contain no authenticated codeql-dispatch/<language> terminal status

This is the same causal RED #2040 is intended to remove: a consumer can terminalize before authoritative dispatch publication/settlement exists. Acceptance should require an unchanged-head run where producer/dispatch terminal publication necessarily precedes consumer enforcement (or an equivalent evidence-settlement dependency), then the exact consumer shards read that bound terminal evidence and finish GREEN. Please do not convert the canary into sleep/poll/no-op retry semantics, synthetic status, or predecessor-evidence transfer.

Copy link
Copy Markdown
Contributor Author

Fresh LineageWeave consumer evidence for the canonical CodeQL producer/handler owner: ContextualWisdomLab/LineageWeave#983@8274f1a12e1f5c4ad7f31c91cba39cc79f277831, CodeQL PR run 34271323034. Detect CodeQL languages completed GREEN and Dispatch current-head CodeQL scan job 102214350850 completed GREEN. The three compatibility shards (python 102213448787, javascript-typescript 102213448864, actions 102213448967) each successfully completed Read current-head CodeQL dispatch verdict and then failed closed at Release runner or enforce current-head CodeQL verdict, with no authenticated terminal central verdict available to satisfy the exact-head consumer gate. No LineageWeave-local CodeQL substitute, synthetic status, manual rerun, or gate waiver was introduced. This is downstream RED evidence for the central receipt/wake cycle; consumer acceptance remains withheld until the owner repair is protected and a fresh exact consumer run obtains its terminal authenticated verdict.

Copy link
Copy Markdown
Contributor Author

Second LineageWeave branch reproduces the central current-head CodeQL receipt gap. On LineageWeave#929@fabdacd4c487be7feb8db02c32b79d4e7d89f581, CodeQL run 34255176054 detects languages successfully (102159027782) and dispatches the exact current-head central scan successfully (102159904449). The javascript-typescript (102159092314), python (102159092329), and actions (102159092343) compatibility shards each complete Read current-head CodeQL dispatch verdict, then fail closed at Release runner or enforce current-head CodeQL verdict. This is the same consumer-side terminal-verdict failure observed on #983, on a distinct product head. Keep the recovery centralized here; no LineageWeave-local scan/status fabrication or gate waiver has been introduced.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 liveness finding from exact current-head CodeQL run 34251822255: both matrix jobs are now terminal FAILURE (actions job 102154521648, python job 102154523061), but coordinator job 102154736341 failed with CodeQL coordinator could not bind every pending language to an exact failed job. The workflow correctly declares needs: [detect-languages, analyze-head], yet the coordinator snapshots the run-jobs REST collection only once and builds required_jobs only from entries already observed as status=completed && conclusion=failure. The exact run demonstrates that needs completion and REST job-state visibility are not sufficiently atomic for that one-shot read: a language remained pending with no terminal job in the snapshot even though its matrix job subsequently/externally reads terminal failure. Treat this as owner RED, not a ConceptWeave leaf defect. A bounded repair should re-read the exact run/job set until every detected matrix name has one stable terminal rerunnable identity (or a bounded fail-closed deadline), while continuing to reject duplicate/unrelated/rewritten jobs. Add a regression where the first Jobs API snapshot exposes one matrix job as nonterminal and a later snapshot exposes both terminal failures; dispatch must neither fail prematurely nor fire against a partial required_jobs set. No manual rerun or leaf churn is warranted before the owner repair is exact-head GREEN.

Copy link
Copy Markdown
Contributor Author

Fresh ContextualWisdomLab/LineageWeave#983 consumer evidence on exact head 28ed29508dc70be6e92a043c6d5a83cbea1e8271 reproduces the central current-head verdict boundary after successful dispatch. CodeQL PR run 34277210172 detects the language matrix successfully and later Dispatch current-head CodeQL scan job 102234188904 succeeds. Nevertheless the Python (102233241670), JavaScript/TypeScript (102233241674), and Actions (102233241754) compatibility jobs each successfully execute Read current-head CodeQL dispatch verdict and then fail closed at Release runner or enforce current-head CodeQL verdict.

This exact consumer therefore reaches central dispatch but does not receive an acceptable terminal/base-bound verdict. No LineageWeave-local CodeQL substitute, synthetic status, manual rerun, or gate waiver was added. Please retain this as an independent consumer acceptance case for #2040: after the owner successor reaches immutable protected main and LineageWeave pins/consumes it, these same exact-base/head language shards must resolve the central receipt to a terminal passing verdict rather than fail at enforcement.

Copy link
Copy Markdown
Contributor Author

Owner-path fresh evidence only; no source/ref/state mutation from the fleet lane.

Exact head 6706c231ab06a3c91c43fdb5b989cfcd79fff593, CodeQL PR run 34251822255 attempt 7 has now settled terminal FAILURE. Repository-owned Security/SAST/Python Security/Agent Review runs on this exact SHA are SUCCESS; CodeQL is the remaining hosted RED.

New causal specimen in job 102154736341 (Dispatch current-head CodeQL scan): final run metadata records both matrix compatibility jobs as terminal failures — Python 102154523061 completed 16:44:58Z and Actions 102154521648 completed 16:54:30Z. Dispatch started 16:54:34Z, only ~4s after the Actions failure, and exited at 16:55:25Z with CodeQL coordinator could not bind every pending language to an exact failed job. The dispatcher builds required_jobs by immediately re-reading the required run jobs, then rejects any pending language not found in that failed set. The final API state now shows both exact matrix jobs failed, so this failure is consistent with an unsettled/immediately-stale jobs read at the producer boundary rather than a missing matrix job in the final generation.

RED: unchanged exact (repository=.github, PR=2040, head=6706c23..., base=7fd571d..., required_run=34251822255) reaches failed-only dispatch after the matrix jobs finish, but the coordinator can still observe a pending language without a corresponding failed-job record and terminally abort.

GREEN acceptance: before deriving required_jobs/unmapped_pending_languages, settle the exact required-run job view to one unambiguous job per detected language with a terminal rerunnable conclusion (or use an equally authoritative dependency output that cannot lag the matrix completion). Any bounded retry must revalidate live PR/head/base and must fail closed on ambiguity, rewritten/divergent authority, duplicate jobs, nonterminal exhaustion, or unrelated failed jobs. Do not paper over this with a consumer no-op, manual rerun, synthetic status, predecessor receipt, or fail-open. Add a deterministic regression where the first jobs snapshot is stale/nonterminal for a just-completed matrix job and a subsequent exact-run snapshot is terminal; the coordinator should settle then dispatch the exact failed set once.

seonghobae commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Fresh LineageWeave consumer evidence on exact ContextualWisdomLab/LineageWeave#983@17770e3dbc99201424d08017b7334348eff761ab: CodeQL PR run 34282238437 detects languages successfully. Python job 102250018793, javascript-typescript 102250018823, and Actions 102250018871 each successfully complete Read current-head CodeQL dispatch verdict and then fail only at Release runner or enforce current-head CodeQL verdict. Recovery job 102252134818 subsequently completed Dispatch current-head CodeQL scan successfully, so dispatch itself is not the remaining failure. The compatibility shards still have no accepted terminal current-head verdict. This remains consumer RED only: .github#2040 is unmerged owner work, and no LineageWeave-local CodeQL substitute, synthetic status, bypass, or owner GREEN/release is claimed.

Copy link
Copy Markdown
Contributor Author

Orgmetra consumer canary, read-only owner handoff from #55. Exact consumer head 147b8fc2f1938cb69b45532a0418ae78dca0be30 reproduced the same required-workflow ordering RED in CodeQL run 34281722437: Python consumer job 102248729053 enforced and failed at 21:44:33Z, Actions consumer 102248729269 enforced and failed at 21:44:41Z, while Dispatch current-head CodeQL scan job 102249586821 did not start until 21:46:56Z and then succeeded at 21:47:03Z. Foundation/Security/SAST on the same Orgmetra head are GREEN, so this is not a source-test failure. Please preserve this exact timing as a consumer acceptance case: consumer enforcement must not terminal-fail before the authoritative producer/dispatch publication for its exact base/head attempt can settle. No rerun, synthetic status, sleep/poll workaround, or consumer workflow edit was performed.

Copy link
Copy Markdown
Contributor Author

Fresh Orgmetra consumer canary reproduces the same required-CodeQL settlement ordering defect on a new exact head. Consumer: ContextualWisdomLab/Orgmetra#65@b7f2b730b8b231aa28e485c655fd8cdf18007d46, required run 34289116329. CodeQL compatibility analysis (actions) job 102271601195 enforced FAILURE at 2026-09-08T23:14:02Z and Python job 102271601217 enforced FAILURE at 23:14:03Z, while authoritative Dispatch current-head CodeQL scan job 102273249299 did not start until 23:17:33Z and then completed SUCCESS at 23:17:39Z. This is independent of the Orgmetra auth change: the consumer can terminal-fail before its same-run producer/dispatch evidence is able to settle. Acceptance remains causal: consumer enforcement must be downstream of terminal producer/dispatch publication (or an equivalent evidence-settlement barrier), not sleep/poll/no-op rerun/predecessor verdict transfer. Orgmetra #65 will remain Draft; no leaf workflow weakening or retry is being used.

Copy link
Copy Markdown
Contributor Author

AIP owner-path evidence from exact #2040@6706c231ab06a3c91c43fdb5b989cfcd79fff593 narrows the remaining CodeQL failure to a coordinator job-state settlement race, not a leaf SARIF/security finding.

Exact required run 34251822255, attempt 7:

  • Python receiver 102154523061 completed FAILURE at 16:44:58Z after RUN_ATTEMPT=4 found no authenticated terminal verdict.
  • Actions receiver 102154521648 completed FAILURE at 16:54:30Z after RUN_ATTEMPT=7 found no authenticated terminal verdict.
  • Coordinator 102154736341 was created at 16:54:30Z, began at 16:54:33Z, and took its one jobs_json snapshot immediately after start. It then spent ~50 s enumerating receipt/direct evidence and finally failed at 16:55:25Z with CodeQL coordinator could not bind every pending language to an exact failed job.
  • A fresh REST read of the same run with filter=latest now returns exactly four jobs and both matrix jobs as completed/failure, so the pending languages are bindable after settlement.

The current coordinator freezes jobs_json once before the comparatively expensive evidence scan, then uses that stale snapshot to build required_jobs; a short GitHub Jobs-view propagation lag can therefore leave a pending language unmapped even though its receiver has terminally failed by the time dispatch admission is evaluated.

Canonical repair suggestion: keep exact run/head/base/language identity fail-closed, but add a bounded settlement/re-read of the latest run jobs immediately before deriving/finalizing required_jobs for pending_matrix (or re-read only when an otherwise-pending language is not terminal in the first snapshot). Require exactly one latest named matrix job per language and only accept completed/{success,failure}; cap attempts/time and fail closed on ambiguity/nonterminal exhaustion. Do not weaken receipt/source/SARIF provenance, synthesize status, or retry a historical leaf run as a substitute. Add an executable contract where the first Jobs view reports one exact receiver nonterminal and the second reports the same job ID terminal failure, proving the coordinator waits/re-reads and dispatches exactly once; also retain a bounded-exhaustion RED that fails closed.

Copy link
Copy Markdown
Contributor Author

Fresh Orgmetra consumer canary on ContextualWisdomLab/Orgmetra#63@d88800a5ca3ca15df332e8def5e25064c46e4005 reproduces the central publication/settlement ordering RED after the source-owned Foundation/Security/SAST gates are GREEN.

Exact required CodeQL run: 34294884616.

  • CodeQL compatibility analysis (actions) job 102289273879: started 00:24:48Z, verdict read completed 00:26:32Z, enforcement terminal FAILURE 00:26:32Z.
  • CodeQL compatibility analysis (python) job 102289273811: started 00:24:48Z, verdict read completed 00:26:56Z, enforcement terminal FAILURE 00:26:56Z.
  • Only after those consumer failures, Dispatch current-head CodeQL scan job 102289748560 started 00:27:01Z and completed SUCCESS at 00:27:08Z.

This exact chronology is incompatible with treating the leaf failure as an Orgmetra source/SARIF defect: both compatibility consumers can terminally enforce before their same-run dispatch publication has even begun. Orgmetra will keep #63 Draft and will not use blind rerun, sleep/polling, synthetic status, predecessor verdicts, or leaf gate weakening. Canonical repair remains here: producer/dispatch settlement must causally precede consumer enforcement (or an equivalent evidence-settlement barrier must make the authoritative evidence set complete before enforcement).

Copy link
Copy Markdown
Contributor Author

Fresh LineageWeave consumer evidence from ContextualWisdomLab/LineageWeave#983@b69efde292a4bcf0c8ef78da31379965e9a34339:

CodeQL PR run 34303750819 detects the exact current languages successfully. The actions (102316243019), javascript-typescript (102316243086), and python (102316243051) compatibility jobs all successfully read the current-head dispatch verdict and then fail specifically at Release runner or enforce current-head CodeQL verdict. A new Dispatch current-head CodeQL scan job 102318750024 subsequently materialized queued; no compatibility failure was bypassed or converted into a leaf-local status.

This is another immutable consumer RED for the canonical producer/handler path. Acceptance remains a terminal authenticated current-head/base-bound receipt from the owner workflow; LineageWeave has not added a substitute CodeQL workflow, synthetic status, provider/model pin, or waiver.

Copy link
Copy Markdown
Contributor Author

Fresh Orgmetra consumer canary for the same publication/settlement ordering boundary; no leaf rerun or workaround was applied.

Consumer: ContextualWisdomLab/Orgmetra#96

  • protected base: develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f
  • exact head: f0caa7fb32d722fff23180bb3bd713fca15a4dc6
  • required CodeQL run: 34305826084
  • Actions compatibility consumer 102323444330: Read current-head CodeQL dispatch verdict ran 03:18:17Z–03:20:23Z, then Release runner or enforce current-head CodeQL verdict failed; job terminal 03:20:25Z.
  • Python compatibility consumer 102323444416: verdict read ran 03:20:41Z–03:22:49Z, then enforcement failed; job terminal 03:22:51Z.
  • authoritative Dispatch current-head CodeQL scan job 102325341752 did not start until 03:24:35Z and then succeeded at 03:24:43Z.

This ordering makes the consumer fail before its same-run authoritative dispatch can settle, so the Orgmetra source head cannot causally repair it. Please retain this as an exact downstream acceptance fixture for #2040. GREEN requires the compatibility consumers to bind the settled exact base/head producer evidence rather than terminally enforcing a pre-settlement verdict. Do not solve this with sleep/polling in Orgmetra, synthetic statuses, predecessor verdict reuse, or gate weakening.

Copy link
Copy Markdown
Contributor Author

Fresh LineageWeave consumer canary on exact ContextualWisdomLab/LineageWeave#983@e2bcba49dd9b2baab129de9c3872d77f654dd16a reproduces the current owner receipt gap. CodeQL PR 34309004501: language detection job 102332008581 GREEN; Python 102333214954, JavaScript/TypeScript 102333214979, and Actions 102333215027 each successfully complete Read current-head CodeQL dispatch verdict and then fail closed at Release runner or enforce current-head CodeQL verdict. Recovery job 102334456487 (Dispatch current-head CodeQL scan) has materialized for the same exact head and was queued at the latest consumer read. This narrows the consumer symptom to accepted terminal receipt/recovery rather than language detection or LineageWeave-local analysis. No local status synthesis, provider pin, manual rerun, or gate weakening is requested; protected owner delivery followed by fresh unchanged-head consumer evidence remains required.

Copy link
Copy Markdown
Contributor Author

Fresh Orgmetra downstream canary on an unchanged exact head reproduces the publication/settlement ordering defect; this is evidence for the existing canonical repair, not a request for a leaf rerun or a second writer.

Consumer: ContextualWisdomLab/Orgmetra#96

  • protected base: develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f
  • exact head: 8243383ef33e9c75ce6232c0d06209186e4c08ca
  • required CodeQL run: 34310206229
  • Actions compatibility job 102337267365: terminal FAILURE after verdict enforcement at ~04:32Z
  • Python compatibility job 102337267418: terminal FAILURE after verdict enforcement at ~04:32Z
  • authoritative current-head dispatch job 102338576499: did not start until 2026-09-09T04:41:27Z, then completed SUCCESS at 04:41:35Z

The consumer can therefore become terminal RED roughly nine minutes before its authoritative current-head producer/dispatch even starts. This is the same falsifiable ordering boundary #2040 owns: consumer enforcement can outrun producer settlement. Preserve fail-closed behavior, but settle/wake producer evidence before terminal enforcement. No sleep/polling workaround, synthetic status, predecessor verdict transfer, or Orgmetra-local workflow change was made.

Copy link
Copy Markdown
Contributor Author

DiskSage downstream evidence confirms the cross-repository wake boundary on protected .github/main@7fd571dbcdbae6acf29d8f4ee704d7ba6297e4db.

ContextualWisdomLab/disksage#264@90ca44841891d98615b11117de0f35adf917cc31, required CodeQL run 34131403342, dispatched central run 34320251920. Both language scans completed CodeQL analysis and the Medium+ SARIF gate clean; the actions artifact was preserved as codeql-dispatch-actions-34320251920-1 (artifact 10091640392, SHA-256 909ac44b69846450e3e3c46a1f5cf5ef527bc7365dfef652024b2ef9d6621f7f). Status publication was denied with HTTP 403 for both the exchanged App token and github.token, as expected under the current protected handler. The terminal failure was the subsequent wake step: GH_TOKEN was empty, WAKE_TOKEN_SOURCE=unavailable, then Actions-capable CodeQL wake credential is unavailable.

This is not a DiskSage SARIF/source failure and I am not adding a leaf workaround or synthesizing a status. It is concrete cross-repository evidence for this PR's target Actions-capable wake credential boundary.

Separately, this PR's own exact CodeQL run 34251822255 is now terminal FAILURE. Coordinator job 102154736341 reached CodeQL coordinator could not bind every pending language to an exact failed job. on exact 6706c231ab06a3c91c43fdb5b989cfcd79fff593; that current-head failure should remain a merge gate rather than inheriting the local 133/3088-pass evidence.

Copy link
Copy Markdown
Contributor Author

Fresh Orgmetra downstream canary reproduces the same producer/consumer settlement-ordering defect on an unchanged exact head and should be included in #2040 acceptance rather than retried locally.

Consumer: ContextualWisdomLab/Orgmetra#96

  • protected base: develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f
  • exact head: 85ba782d70f2d3800a8a13abb04a48326277feea
  • required CodeQL run: 34317809718
  • Python compatibility job 102358190322: started 06:17:50Z, Release runner or enforce current-head CodeQL verdict failed, completed 06:20:07Z
  • Actions compatibility job 102358190367: started 06:17:58Z, same enforcement failure, completed 06:20:09Z
  • authoritative Dispatch current-head CodeQL scan job 102360038609: did not start until 06:26:23Z and succeeded at 06:26:27Z

So both consumers became terminal RED roughly six minutes before their own current-head producer/dispatch was allowed to execute. This is not an Orgmetra source failure and predecessor verdicts are not transferable. Please preserve this exact run/job timing as a downstream RED fixture for the run-wide settlement/wake repair and prove the repaired central workflow on an unchanged exact consumer head. Orgmetra will not use unchanged-head reruns, sleeps/polling, synthetic statuses, or leaf workflow weakening to work around it.

Copy link
Copy Markdown
Contributor Author

LineageWeave consumer evidence update. Exact predecessor 69f7e6a3f74dd94d004268d3cc47b0e14f3e1d01 CodeQL PR run 34326058139 passed language detection and the current-head dispatch lookup, while JavaScript/TypeScript, Actions, and Python compatibility lanes each read the dispatch verdict and then failed closed at terminal-verdict enforcement. This is not a LineageWeave source-analysis substitute case, and no synthetic receipt/local CodeQL replacement was added. Current LineageWeave parent 031cb4fe51d43ac3d8f792fe8180ab858617d1bc has fresh CodeQL PR run 34328980370 queued and must earn a new exact-head receipt.

Copy link
Copy Markdown
Contributor Author

Fresh downstream exact-head canary from ContextualWisdomLab/Orgmetra#96; this is evidence for the existing canonical CodeQL owner, not a request for a leaf workaround.

  • protected consumer base: Orgmetra/develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f
  • exact consumer head: a09d2eb30df2eb00d79ef689d489643aabcc9233
  • CodeQL PR run: 34327473128
  • Python compatibility job 102390812915: terminal enforcement failure at 2026-09-09T08:24:43Z
  • Actions compatibility job 102390812940: terminal enforcement failure at 2026-09-09T08:25:53Z
  • authoritative Dispatch current-head CodeQL scan job 102393114801: did not start until 08:36:12Z, then completed SUCCESS at 08:36:19Z

This reproduces the same producer/consumer settlement-ordering defect on a new immutable consumer head: both compatibility consumers exhaust/enforce before the authoritative exact-head dispatch is even scheduled to run. Orgmetra will not rerun the unchanged head, add sleeps/polling, synthesize a status, or transfer a predecessor verdict.

Fresh read of this central PR still has exact head 6706c231ab06a3c91c43fdb5b989cfcd79fff593; its hosted Security/SAST/Python Security/runtime-quality runs are terminal GREEN, but its own CodeQL run 34251822255 is terminal FAILURE. Keep the repair here until the canonical owner itself reaches exact-head GREEN and integrates normally to protected .github/main, then reacquire a downstream exact-head canary.

Copy link
Copy Markdown
Contributor Author

Fresh downstream canary from ContextualWisdomLab/accounting-information-platform#57@89b8bcaa6ae3268554171abfebd2a9b65b8cab80 strengthens the remaining ordering defect on the current protected generation.

Required CodeQL run 34331096131 terminaled FAILURE. Detect job 102399939498 succeeded. Python receiver 102400983266 started 08:56:28Z and failed its final Release runner or enforce current-head CodeQL verdict step at 08:58:30Z; Actions receiver 102400983324 started 08:56:50Z and failed the same enforcement step at 08:58:56Z. The authoritative Dispatch current-head CodeQL scan job 102402891472 did not start until 09:06:59Z and then succeeded at 09:07:06Z.

This is the same exact required run/head, not historical evidence: both compatibility receivers become terminal FAILURE before the producer/dispatch job begins. A bounded jobs re-read after receiver start cannot repair a receiver that has already irreversibly failed because its required producer evidence does not yet exist.

Please make producer/dispatch publication an explicit prerequisite/evidence barrier before receiver terminal enforcement (or equivalent exact-run settlement architecture). Preserve repo/PR/base/head/language/required-run/SARIF/creator binding and fail closed on ambiguity/staleness; do not solve with fixed sleeps, unrelated-run polling, synthetic status, no-op pushes, PAT bypass, or predecessor verdict transfer. Add a deterministic RED where receiver execution is scheduled before dispatch and GREEN only when terminal enforcement waits for authenticated exact-run publication.

Copy link
Copy Markdown
Contributor Author

Fresh LineageWeave consumer evidence, exact PR #983 head b65d4301552f95de75eb51e085eb0f31dcdf5413: CodeQL PR run 34335655787 detected languages successfully and Dispatch current-head CodeQL scan succeeded. The actions, python, and javascript-typescript compatibility jobs each completed Read current-head CodeQL dispatch verdict, then failed at Release runner or enforce current-head CodeQL verdict. This is a current-head terminal-receipt/enforcement failure after successful dispatch, not a LineageWeave source-analysis substitute opportunity. No synthetic status, rerun churn, provider/model pin, or leaf waiver was added. Please carry this exact consumer shape through the canonical owner promotion and revalidate the unchanged LineageWeave head afterward.

Copy link
Copy Markdown
Contributor Author

Fresh downstream canary: Orgmetra PR #96 exact head f84dcb64b51dc492af938a4bdd0836354b1a4496, CodeQL PR run 34338465693.

The settlement-ordering RED still reproduces on this exact consumer head:

  • CodeQL compatibility analysis (actions) job 102423905017: started 10:08:59Z, current-head verdict read 10:09:01–10:11:15Z, enforcement failed at 10:11:15Z, job terminal FAILURE 10:11:18Z.
  • CodeQL compatibility analysis (python) job 102423905047: started 10:09:29Z, verdict read 10:09:30–10:11:42Z, enforcement failed at 10:11:42Z, job terminal FAILURE 10:11:43Z.
  • Authoritative Dispatch current-head CodeQL scan job 102424751068 was not even created until 10:11:43Z, then started 10:13:02Z and completed SUCCESS 10:13:08Z.

So both consumers can terminal-fail before their exact-head producer gets a chance to run. This is not an Orgmetra source finding and I am not applying a leaf rerun/sleep, synthetic status, predecessor verdict transfer, or local gate patch. Please retain this exact run/job timing as a downstream acceptance canary for #2040's run-wide settlement owner and required-run wake/recovery contract.

Copy link
Copy Markdown
Contributor Author

Fresh downstream exact-run evidence from ContextualWisdomLab/accounting-information-platform#59@c7584934791f47bfe9d7d64415571b7caf86b0c4 reproduces the receiver-before-dispatch ordering defect on required CodeQL run 34338476034.

  • Python receiver job 102424032480 started 10:10:16Z and failed terminal enforcement at 10:12:37Z.
  • Actions receiver job 102424032529 started 10:10:17Z and failed terminal enforcement at 10:12:19Z.
  • The same-run authoritative Dispatch current-head CodeQL scan job 102425019742 did not start until 10:14:20Z, then completed SUCCESS at 10:14:25Z.

So both receivers became irreversible FAILURE roughly 1m43s–2m01s before the producer/dispatch job even began. This is stronger than a transient Jobs-view settlement lag: a bounded final re-read cannot repair a receiver that has already failed before authoritative same-run evidence exists.

Keep the repair fail closed, but make receiver/current-head enforcement wait on an authenticated exact-run producer/publication barrier (same repository, PR/base/head, language, required-run and protected workflow identity) before terminal verdict. Do not replace this with fixed sleep, unrelated-run polling, predecessor verdict transfer, historical rerun, PAT/status synthesis or no-op push. A realistic RED should model receiver-visible state before producer dispatch exists, then the same run/job identities becoming authoritative only after dispatch/publication; GREEN must avoid terminal failure until that barrier resolves or boundedly times out/ambiguous-fails.

Copy link
Copy Markdown
Contributor Author

Fresh LineageWeave consumer reproduction from #983 exact 87a462c621a45cf7b79c0e2dbb332011f54203ed: CodeQL PR run 34338077652 detected languages successfully. The python (102422742284), javascript-typescript (102422742274), and actions (102422742395) compatibility jobs each successfully read the current-head dispatch verdict and then failed at Release runner or enforce current-head CodeQL verdict. Only after those terminal failures did job 102425054131 dispatch the current-head CodeQL scan successfully. This is a current consumer instance of the producer/handler ordering/recovery cycle addressed by #2040; no LineageWeave-local rerun shim, synthetic status, provider pin, or gate waiver was added. Consumer acceptance still requires a fresh exact-head terminal receipt after the owner repair reaches protected immutable truth.

Copy link
Copy Markdown
Contributor Author

Current LineageWeave consumer confirmation on #983 exact 77e7710e18e51e70f1dca595142b24c2459c2a0d, CodeQL PR run 34340137723: language detection succeeded; actions (102429034754), python (102429034756) and javascript-typescript (102429034801) compatibility jobs each successfully read the current-head dispatch verdict, then failed only at Release runner or enforce current-head CodeQL verdict; afterward Dispatch current-head CodeQL scan job 102429851023 succeeded. This reproduces the producer/handler ordering/recovery cycle on a new exact consumer head. No LineageWeave-local shim, synthetic status or gate waiver was added; consumer acceptance still requires a fresh terminal current-head receipt after the canonical owner repair reaches protected immutable truth.

Copy link
Copy Markdown
Contributor Author

Fresh Orgmetra #96 exact-head canary after an ordinary-forward test-docstring provenance correction (no CodeQL consumer workflow/config change): head 0e69f0799898b7e19edcf19bca2d2cf6483f65fe, required run 34343441437. Actions consumer job 102439409996 started its current-head verdict read at 11:02:57Z, observed pending, and after its built-in wait path enforced failure at 11:04:56Z (CodeQL scan dispatched. The dispatch workflow will rerun this exact failed CodeQL job after publishing its terminal verdict.). Python consumer 102439410018 likewise terminal-failed. The coordinator job 102440094120 did not start until 11:05:19Z and posted the repository dispatch around 11:05:20Z, after both consumer jobs had already become terminal failures. The coordinator itself then succeeded. This preserves the same producer/consumer settlement-ordering RED even with the current consumer wait path: the consumers can terminal-fail before their exact-head producer is actually dispatched. No Orgmetra rerun/sleep/synthetic status/predecessor verdict transfer or local gate patch was added.

Copy link
Copy Markdown
Contributor Author

Fresh downstream canary from ContextualWisdomLab/OriginWeave#308 matches this PR's target-App publication/wake boundary and is now recorded on canonical issue #1929 (5600829345).

Exact consumer: OriginWeave#308@0cf4275d364f529eb3c23dbbfec5ce20113db47e, base 87c4daa1830bac5a5228b6036752ad5633232085, required CodeQL run 34339120658.

Central dispatch run 34339474860 validates the exact envelope. All three scan jobs complete CodeQL analysis and the Medium+ SARIF gate; Python reports CODEQL_SARIF files=1 results=0 medium_plus=0 and preserves artifact 10099385445 / SHA-256 6661ad42b03f64c0589283e19827929043c4fdf49649fe73c33d541fadd000de. After the clean scan, target commit-status publication is denied for both attempted credentials with HTTP 403 Resource not accessible by integration; then the wake step has blank GH_TOKEN, WAKE_TOKEN_SOURCE=unavailable, and fails Actions-capable CodeQL wake credential is unavailable. The target commit has no codeql-dispatch/* status context.

Downstream required compatibility shards therefore remain failed even though the dispatched analyses are clean. This is useful acceptance evidence for the exchanged target-App/status-publication + exact required-job wake path here. Please preserve the exact repo/PR/head/base/required-run binding and prove an unchanged downstream head can publish the authenticated terminal status and wake/settle the exact required jobs. OriginWeave will not copy this workflow, synthesize a status, make a no-op retrigger commit, weaken CodeQL, or consume this mutable PR head as a dependency.

Copy link
Copy Markdown
Contributor Author

Fresh accounting-information-platform consumer canary confirms the same P1 ordering defect on a new exact head. AIP #59@72e8e342eaeb4edd40c11284f11473a8622aea79, required CodeQL run 34343805562: Actions receiver 102440736438 terminal-enforced failure at 2026-09-09T11:09:43Z; Python receiver 102440736342 terminal-enforced failure at 11:10:12Z; the same-run authoritative dispatch 102441550425 did not start until 11:11:29Z and completed SUCCESS at 11:11:36Z. Thus receiver enforcement again became irreversible before same-run producer/dispatch evidence existed. Preserve exact repository/PR/base/head/language/required-run/SARIF provenance, but order receiver/current-head terminal enforcement after authenticated dispatch/publication settlement (or equivalent exact-run barrier). This is consumer evidence only; no leaf rerun, synthetic status, PAT workaround, no-op push, or gate weakening was used.

Copy link
Copy Markdown
Contributor Author

DiskSage consumer-owner handoff, fresh 2026-09-09 KST evidence: exact #2040 head 6706c231ab06a3c91c43fdb5b989cfcd79fff593 is no longer non-terminal. CodeQL PR run 34251822255 completed failure. Jobs 102154521648 (actions) and 102154523061 (python) failed at Read current-head CodeQL dispatch verdict; dispatch job 102154736341 also failed. The dispatch log terminates with CodeQL coordinator could not bind every pending language to an exact failed job. after building required_jobs only from matrix jobs whose current required-run conclusion is failure. This is current owner-path evidence, not a DiskSage SARIF finding. Security 34251822390, SAST 34251822314, Python Security 34251822251, and Agent Review Runtime Quality 34251822381 are terminal success on the same head. Please preserve fail-closed semantics and repair the pending-language ↔ exact-rerunnable-job binding in the canonical owner before asking DiskSage #264 to rerun; no leaf status/workflow workaround will be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: high High-priority or P1 work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant