Repository navigation
[tlc-tests] Add CancelledRerunAccounting boundary tests for daily AIC carry-forward - #75645
Conversation
Extract implementation regressions from specs/daily-aic/CancelledRerunAccounting.tla for the cancelled-rerun carry-forward path in sumCoveredComponents and loadBillableJobs: current producer precedence, expired/missing producers, skipped earlier attempts, and non-cancelled outcomes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection results could not be parsed. Review the workflow run logs to troubleshoot the error.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
❌ Ponytail Reviewer failed to deliver outputs. Please review the logs for details.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes are limited to deterministic boundary regression coverage for cancelled-rerun carry-forward behavior, with no active review concerns identified.
No open issues 🎉
What changed in this PR
Adds 12 deterministic boundary regression tests for daily AIC carry-forward behavior after cancelled reruns. The changes affect tests only and validate the implementation against the corresponding TLA+ model rules.
Changes:
- Covers producer precedence, missing or expired evidence, ambiguous producers, skipped attempts, and non-cancelled outcomes.
- Verifies carry-forward accounting, warnings, and fail-closed rejection behavior.
- Focused Vitest suites pass with 271 tests, and formatting validation succeeds.
| File | Description |
|---|---|
actions/setup/js/daily_aic_component_coverage.test.cjs |
Adds boundary tests for cancelled-rerun accounting, producer verification, carry-forward behavior, and rejection paths. |
Review effort: Lite (auto)
|
🎉 This pull request is included in a new release. Release: |
Warning
Threat detection engine error
Threat detection could not complete its analysis due to a tooling error. This is not a security finding.
What happened
The threat detection results could not be parsed.
Review the workflow run logs to troubleshoot the error.
This PR adds 12 deterministic regression tests to
actions/setup/js/daily_aic_component_coverage.test.cjs, taken from the boundary cases ofspecs/daily-aic/CancelledRerunAccounting.tla. No production code, specs, workflows, or manifests change.Dedup key:
tlc-tests:specs/daily-aic/CancelledRerunAccounting.tlaTLC results
TypeOKCarriedRequiresVerifiedEvidenceOtherOutcomesRequireCurrentProducerAmbiguousPriorFailsClosedMissingAccountingFailsClosedCurrentDecisionRequiresCurrentProducer-deadlock, and the spec has no step after the singleEvaluatemove, so TLC treats finished states as deadlocks. No invariant is violated. This is a documentation/model gap and is not fixed here; a follow-up could add-deadlockto the README or add anUNCHANGEDstep for finished states.carried,current, andrejectedcan each occur (exit 12, with the expectedNoDecision_*invariant named each time). So the invariants above are not trivially true.Tools: TLA+ Tools v1.7.4 (TLC 2.19 rev 5a47802) on Temurin 21.0.12.1. Each run used 2 workers,
-Xmx4g, a 5-minute timeout, and its own-metadir. No repository checker covers this module, so SANY and TLC were run directly fromspecs/daily-aic/.CancelledRerunAccounting.tla08dba7ad5db55c5edbaeb0c9c47520d6b064858ffea93e99b35254b45686762fCancelledRerunAccounting.cfg7588f6f9a5118d5b787057bee61c5e37d4ffb91da462cfda6d353b770b00b0cbtla2tools.jar936a262061c914694dfd669a543be24573c45d5aa0ff20a8b96b23d01e050e88Limits of the check. The model uses small fixed value sets for outcome, producer, prior producer, and accounting. It does not cover the artifact API, timestamp arithmetic, multiple components, or liveness. Passing it does not prove the implementation correct for all inputs.
Spec rules and the tests that cover them
sumCoveredComponents,attempt > 1producer checkCarriedRequiresVerifiedEvidencecancelled, single prior, unexpired producer bound to the prior attempt's window)sumCoveredComponentstable: cancelled → 2; success/failure/timed_out → throwOtherOutcomesRequireCurrentProducersuccessandtimed_outreruns without their own producer are rejectedrejected!producer?.id,producer.expired, window checksloadBillableJobsleaves skipped jobs out ofpriorJobswarnedis set only when usage is carried forwardcore.warning(...carried-forward...)Mutation check
I applied each change below to
daily_aic_component_coverage.cjsone at a time, ran the tests, then restored the file. A byte-compare confirmed the file is unchanged. Mutations M1–M4 were caught only by the new tests; no existing test failed for them.Validation
Run from
actions/setup/jswith vitest 5.0.5 on Node 24.npx vitest run daily_aic_component_coverage.test.cjs daily_aic_spec_conformance.test.cjs check_daily_aic_workflow_guardrail.test.cjs(before)npx prettier --check daily_aic_component_coverage.test.cjs --ignore-path ../../../.prettierignoretsconfig.jsonexcludes**/*.test.cjs, so the type check does not cover the changed file.Notes
Warning fires before the missing-accounting error. When a cancelled rerun is carried forward but its accounting file is missing, the code logs the carry-forward warning and then throws
Missing accounting. The spec only setswarnedalongsidecarried. The result is still a rejection, no tests depend on the order, and nothing here encodes it.Dependency install workaround.
npm cifailed because the configured registry mirror presented a self-signed certificate. TLS verification stayed on. Instead:registry.npmjs.org, using the unchanged lockfile integrity hashes.@actions/github-scriptwas left out.The temporary
node_modulessymlink was removed afterwards.Evidence artifact not uploaded.
upload_artifactrejected every path I tried, so the evidence (full logs, witness module, and report) is not attached. Its key results are summarized above.