Skip to content

[tlc-tests] Add CancelledRerunAccounting boundary tests for daily AIC carry-forward - #75645

Merged
pelikhan merged 1 commit into
mainfrom
tlc-tests/daily-aic-cancelled-rerun-accounting-11f40910abb3a1c8
Nov 7, 2026
Merged

pelikhan merged 1 commit into
mainfrom
tlc-tests/daily-aic-cancelled-rerun-accounting-11f40910abb3a1c8

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

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 of specs/daily-aic/CancelledRerunAccounting.tla. No production code, specs, workflows, or manifests change.

Dedup key: tlc-tests:specs/daily-aic/CancelledRerunAccounting.tla

TLC results

  • Exhaustive search passed, with deadlock checking turned off. All 192 distinct states (96 initial, depth 2) were explored and all six invariants held:
    • TypeOK
    • CarriedRequiresVerifiedEvidence
    • OtherOutcomesRequireCurrentProducer
    • AmbiguousPriorFailsClosed
    • MissingAccountingFailsClosed
    • CurrentDecisionRequiresCurrentProducer
  • The README's TLC command fails with "Deadlock reached" (exit 11). The README command leaves out -deadlock, and the spec has no step after the single Evaluate move, 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 -deadlock to the README or add an UNCHANGED step for finished states.
  • All three outcomes are reachable. A witness module that extends the spec unchanged confirmed carried, current, and rejected can each occur (exit 12, with the expected NoDecision_* 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 from specs/daily-aic/.

Input SHA-256
CancelledRerunAccounting.tla 08dba7ad5db55c5edbaeb0c9c47520d6b064858ffea93e99b35254b45686762f
CancelledRerunAccounting.cfg 7588f6f9a5118d5b787057bee61c5e37d4ffb91da462cfda6d353b770b00b0cb
tla2tools.jar 936a262061c914694dfd669a543be24573c45d5aa0ff20a8b96b23d01e050e88

Limits 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

Spec rule Implementation New tests
The current attempt's own verified producer wins, even when the earlier attempt is ambiguous sumCoveredComponents, attempt > 1 producer check prefers own verified producer over a verified or ambiguous earlier attempt
CarriedRequiresVerifiedEvidence carry-forward branch (cancelled, single prior, unexpired producer bound to the prior attempt's window) direct sumCoveredComponents table: cancelled → 2; success/failure/timed_out → throw
OtherOutcomesRequireCurrentProducer same branch success and timed_out reruns without their own producer are rejected
Prior producer missing or invalid → rejected !producer?.id, producer.expired, window checks no producer artifact; expired producer from the earlier attempt; expired producer from the cancelled attempt
Prior producer counts as missing when the earlier attempt was skipped loadBillableJobs leaves skipped jobs out of priorJobs rejects when the only earlier attempt was skipped
warned is set only when usage is carried forward core.warning(...carried-forward...) every rejection asserts no warning; the carry-forward case asserts the warning

Mutation check

I applied each change below to daily_aic_component_coverage.cjs one 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.

Mutation Caught by
M1: carry forward for any conclusion 3 new tests
M2: ignore producer expiry when carrying forward 1 new test
M3: a cancelled rerun always uses the earlier attempt 2 new tests
M4: skipped earlier attempts count as the prior 1 new test
M5: carry forward without the warning existing T-AIC-DG-026 + 1 new test

Validation

Run from actions/setup/js with vitest 5.0.5 on Node 24.

Command Exit Result
npx vitest run daily_aic_component_coverage.test.cjs daily_aic_spec_conformance.test.cjs check_daily_aic_workflow_guardrail.test.cjs (before) 0 259 passed
Same command (after) 0 271 passed
npx prettier --check daily_aic_component_coverage.test.cjs --ignore-path ../../../.prettierignore 0 formatted

tsconfig.json excludes **/*.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 sets warned alongside carried. The result is still a rejection, no tests depend on the order, and nothing here encodes it.

  • Dependency install workaround. npm ci failed because the configured registry mirror presented a self-signed certificate. TLS verification stayed on. Instead:

    • Dependencies were installed into a throwaway directory from registry.npmjs.org, using the unchanged lockfile integrity hashes.
    • The git-hosted dev dependency @actions/github-script was left out.
    • Install scripts were skipped.

    The temporary node_modules symlink was removed afterwards.

  • Evidence artifact not uploaded. upload_artifact rejected every path I tried, so the evidence (full logs, witness module, and report) is not attached. Its key results are summarized above.

Generated by Daily TLC Test Expert · copilot · routed: opus55 xhigh · ~279 AIC · ⌖ ~2 AIC · ⊞ 8.1K · ◷

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>
@pelikhan
pelikhan marked this pull request as ready for review November 7, 2026 13:48
Copilot AI adaptive review requested due to automatic review settings November 7, 2026 13:48
@pelikhan
pelikhan merged commit bb4e4eb into main Nov 7, 2026
2 checks passed
@pelikhan
pelikhan deleted the tlc-tests/daily-aic-cancelled-rerun-accounting-11f40910abb3a1c8 branch November 7, 2026 13:48
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

🧠 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 happened

The threat detection results could not be parsed.

Review the workflow run logs to troubleshoot the error.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ 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: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · routed: opus55 medium · ~12 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

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.

Generated from PR Specification Reviewer · gpt56 · ~1 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷

Generated by PR Specification Reviewer for #75645

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

❌ Ponytail Reviewer failed to deliver outputs. Please review the logs for details.

Generated by Ponytail Reviewer for #75645

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 6.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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)

@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v1.2.2

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants