test(ci): resolve the office matrix contract instead of pinning its text - #412
Conversation
Signed-off-by: Seongho Bae <me@seonghobae.me> Co-authored-by: Codex <noreply@openai.com>
`workflowExactHead.test.ts` asserted the Office job's python-version matrix by
exact string equality against the conditional expression currently written in
`.github/workflows/ci.yml`. That makes a legitimate reformatting of the
workflow, or a deliberate change of matrix shape, fail this suite on every
candidate head at once with a message that reports a missing substring rather
than the drift that actually occurred. The Office Python contract carried the
same defect in the opposite direction and is repaired on its own writer; this
is the remaining TypeScript-side instance.
`officeMatrixPythonVersions` now resolves the declaration rather than matching
it. It reads the job's python-version value, decodes every `fromJSON` payload
the expression selects between, and falls back to decoding a literal sequence,
so the current conditional, a whitespace-reformatted conditional, and a plain
inline list all resolve to the same version lists. The assertions then state
resolved obligations and fail with the observed value: no matrix entry may name
an unsupported minor, the exhaustive set must equal the supported minors in
order, and the pull-request set must include the newest supported minor.
This deliberately does not decide the matrix shape. Whether the Office job
keeps the per-event conditional or returns to a literal sequence is a separate
question owned by the workflow writer proposing that change; the contract now
accepts either and objects only to a set that stops matching the supported
minors.
Verification: the file's 12 tests pass, the full suite passes (156 files, 883
tests), and `tsc --noEmit` is clean. A direct exercise of the resolver, kept as
a permanent assertion, covers the conditional, a reformatted conditional, and
the literal sequence, and requires a throw for a job with no matrix and for a
value that resolves to no version list. Injecting `fromJSON('["latest"]')` into
the real workflow fails with `unsupported entries in ["latest"]`; `ci.yml` was
restored and is unmodified by this commit.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RCDAt2v7kz4SFyaFDsSoyD
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.
Findings
1. HIGH Current-head GitHub Checks - Fix failed required checks before approval
- Problem: Failed same-head checks remain for
a7f8109fe08e29d368c41a291b019455392d0523. - Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
- Fix: Read and fix the failed check logs below, then rerun the current-head checks.
- Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.
Failed checks:
- CI/Office / Python 3.14: FAILURE (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508168/job/101724476146)
- CodeQL PR/CodeQL compatibility analysis (actions): FAILURE (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508037/job/101746503920)
- CodeQL PR/CodeQL compatibility analysis (javascript-typescript): FAILURE (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508037/job/101746503994)
- CodeQL PR/CodeQL compatibility analysis (python): FAILURE (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508037/job/101746503970)
- CodeQL compatibility analysis (actions) check run: failure (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508037/job/101746503920)
- CodeQL compatibility analysis (javascript-typescript) check run: failure (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508037/job/101746503994)
- CodeQL compatibility analysis (python) check run: failure (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508037/job/101746503970)
- Office / Python 3.14 check run: failure (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508168/job/101724476146)
- Required Noema Review/noema-review: FAILURE (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508011/job/101747290188)
- Security Scan/trivy-fs: FAILURE (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508121/job/101745811759)
- noema-review check run: failure (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508011/job/101747290188)
- trivy-fs check run: failure (https://github.com/ContextualWisdomLab/inkspan/actions/runs/34116508121/job/101745811759)
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["TypeScript/JavaScript: workflowExactHead.test.ts"]
S1 --> I1["TypeScript or JavaScript runtime"]
I1 --> R1["Review risk: TypeScript/JavaScript: workflowExactHead.test.ts"]
R1 --> V1["package test plus coverage"]
OpenCode Review Overview
|
…ontract' into test/workflow-matrix-resolved-contract
|
Current-head failure evidence (8f39454): CodeQL compatibility jobs fail in the repository dispatch gate with VERDICT_STATE=pending and DISPATCH_OUTCOME=success; the log explicitly says the dispatch workflow should rerun the exact failed job after publishing its terminal verdict. The run list contains no follow-up CodeQL dispatch for this SHA. This is an orchestration/provider-state failure, not a source finding in workflowExactHead.test.ts. I am not transferring predecessor reviews or claiming merge readiness. |
Co-Authored-By: Codex <noreply@openai.com> Signed-off-by: Seongho Bae <me@seonghobae.me>
Co-Authored-By: Codex <noreply@openai.com> Signed-off-by: Seongho Bae <me@seonghobae.me>
Expanded local Office validationExact head: Project-local Python 3.14.6 environment, pytest 9.0.3:
The Python parser now rejects changed event predicates while preserving the declared version arrays; this mirrors the JavaScript contract correction. No runtime Office implementation or workflow execution condition was changed by these follow-ups. Environment boundary: dependencies were installed from |
|
Complete carryover trace (2026-09-08): canonical combined owner #402 now contains exact #412 head |
|
Final successor carryover verification (2026-09-08): #402 exact head |
Scope
src/workflowExactHead.test.tsasserted the Office job'spython-versionmatrix by exact string equality:That is a surface-syntax pin. Any legitimate reformatting of the workflow expression, or a deliberate change of matrix shape, fails this suite on every candidate head at once, reporting a missing substring rather than the drift that actually occurred. Single test file changed;
ci.ymlis not modified.Why now
This is the remaining TypeScript-side instance of a defect class that is currently costing the whole queue. The Python-side instance is the reason protected
mainis red on all fourOffice / Python 3.1xjobs:office/tests/test_python_support_contract.pypins the literal inline list form while the workflow declares the conditional form, so it reportsassert None is not Noneon every head. That repair lives on its own writer (#405). The rule behind both is recorded as a durable obligation in #411.The two instances point in opposite directions, which is exactly the hazard: one file demands the conditional, the other demands the literal list, and no single
ci.ymlsatisfies both.What replaces it
officeMatrixPythonVersionsresolves the declaration instead of matching it — it reads the job'spython-versionvalue, decodes everyfromJSONpayload the expression selects between, and falls back to decoding a literal sequence. Assertions then state resolved obligations and fail with the observed value:SUPPORTED_PYTHON_VERSIONSin order;This does not decide the matrix shape
Whether the Office job keeps the per-event conditional or returns to a literal sequence is a separate question owned by the writer proposing that change (#402 proposes the literal form). This contract now accepts either and objects only when the resolved set stops matching the supported minors, so it stops being a veto on that decision.
[['3.14'], ['3.11','3.12','3.13','3.14']][['3.13','3.14'], ['3.11','3.12','3.13','3.14']][['3.11','3.12','3.13','3.14']]Each of those three is asserted permanently in the added
resolves the office matrix from its value rather than its spellingcase, along with a required throw for a job with no matrix and for a value that resolves to no version list.Verification
src/workflowExactHead.test.ts: 12 tests passed.tsc --noEmit: passed.fromJSON('["3.14"]')withfromJSON('["latest"]')in the real.github/workflows/ci.ymlfails withthe office python-version matrix declares unsupported entries in ["latest"]. The workflow was restored;git statusconfirms.github/is clean and this commit does not touch it.mainat0b88c16f14f51b54a87eb7164f0edfb06dd60902.Scoped local validation of the changed surface, not hosted acceptance. Merge remains gated on the required current-head review and scan verdicts; no bypass is requested.