Repository navigation
Conversation
dc3c3ab to
e8ab47c
Compare
9380cde to
388dbaf
Compare
388dbaf to
421ed21
Compare
…timestamp text Producers format step completion times with isoformat(), which drops the fraction on a whole second, so a later completion stamped ...:01.001000Z sorted before an earlier one stamped ...:01Z and compensation ran in completion order. Sort completed steps by the parsed instant.
…ring compensation The compensation sort used the strict parse_timestamp, which raises on a timestamp without an offset. The workflow history contract checks admit such a value and read it as UTC, so cancelling or timing out a workflow with an admitted offset-less completion raised instead of compensating. Sort with the parser those checks use (diagnostics._parse_timestamp). The regression test now seeds every instant in the past, so the history stays monotonic after the cancellation or timeout. It covers both compensation triggers and three admitted timestamp forms.
… order
sorted(..., reverse=True) is stable, so completions with equal instants
kept their history order and were compensated in the order they ran.
The workflow history contract checks reject only decreasing timestamps,
so in an admitted history the history order of equal instants is their
completion order. Sort ascending and reverse the list in place, so that
equal instants are also compensated in reverse completion order.
The reversal is an explicit list.reverse() call. SonarCloud reported
sorted(...)[::-1] as python:S7511 ("Remove this redundant subscript
reversal"). The reversal is not redundant, and sorted(..., reverse=True)
is not equivalent here: it keeps equal keys in their original order.
The regression test gains an identical-instant pair and a pair that
writes one instant two ways (+00:00, then Z). It now asserts the order
of compensation_workflow_started events, the execution order that
specs/formal/workflows/compensation.md requires.
Collected on dev 348c490 plus this branch with blitz collect_research_evidence.py (production pipeline over 6 pinned artifacts, 10 retained cases via replay_case, 4 production CLI cases, 14 participant test functions), then recorded with python -m tools.research_capture record.
421ed21 to
818d221
Compare
|
Recommendation: do not merge as is. Reviewed head
Required action:
Coverage and outstanding work: #1462's whole-second, naive-as-UTC, differing-offset and equal-instant cases are covered for cancellation and timeouts, with before/after contract validation and captures. Reusing the admission timestamp parser is correct. No source defect found; the merge blocker is the skipped applicable governance check. Verification limits: Complete snapshot and green required status contexts; those contexts do not establish that skipped requirement governance passed. |
…e locator The Cambridge mirror's dist directory now holds Isabelle2026 only, so the locked Isabelle2025-2_linux.tar.gz answers 404 there and canonical / generic-tool-local-inputs fails exact verification, which skips the checks, integration and proof jobs. The official release locator serves the same bytes; the fetch still verifies the unchanged lock size and SHA-256.
… module SEM-204 reached semantics-expansion only through the shared ^SEM- pattern, whose ownership roots exclude raes_runtime/control_plane_workflows.py, so requirement governance for the #1462 compensation fix reported an ownership mismatch (#1510). Add a workflow-compensation-semantics phase listed before semantics-expansion, with the same reference-implementations prerequisite. It keeps the shared semantic roots SEM-204 already reached, without the paths named there for SEM-218 and SEM-233, and adds the compensation module and the carried #1474 locator doc. The shared phase's roots and the other #1510 requirements are unchanged. SEM-204's record gains the IMPLEMENTS and TESTS links governance requires. The new policy test pins the route, its bounds and SEM-223's unchanged phase, and runs SEM-204 governance over the delivery files.
They pin the 2026-10-14 implementation digest; the merged source gets a fresh capture.
Collected on dev cf19e2d plus this branch (implementation digest fa973567) with blitz collect_research_evidence.py: production pipeline over 6 pinned artifacts (38 of 42 stages passed, 4 preregistered non-executions), 10 retained cases via replay_case, 4 production CLI cases and 14 participant test functions (18 passed). Recorded with python -m tools.research_capture record.
|
Addressed the 2026-10-25 review at
|
|
This branch conflicts with dev again after the Quality refactor merges, in |
Summary
specs/formal/workflows/compensation.mdrequires reverse completion order, butmaybe_apply_compensationsorted completed steps by timestamp text.isoformat()drops a whole second's fraction, so...:01.001000Zsorted before...:01Z; offsets and identical stamps misordered too. The fix sorts by the instant parsed with the history contract checks' parser (diagnostics._parse_timestamp, offset-less read as UTC), oldest first, then reverses.For the 2026-10-25 review, SEM-204 gets its own policy phase owning the compensation module and passes governance. #1510 stays open for the other
^SEM-requirements.Requirement UIDs
workflow-compensation-semanticsphase.Related Issues
Closes #1462
ADR Impact
Changes
requirement_order.yaml(Requirement ownership roots do not cover the files of DSL-117, DSL-120, DSL-121, ACT-624, SEM-223 and SEM-204 #1510 option 2, SEM-204 only): the phase sits beforesemantics-expansionand keeps thereference-implementationsprerequisite. It owns SEM-204's shared semantic roots, minus the paths named there for SEM-218 and SEM-233, pluscontrol_plane_workflows.pyand the carried locator doc.semantics-expansionis unchanged. The SEM-204 record gains IMPLEMENTS/TESTS links.requirement-scopes/<prefix>.json; a1344.jsonwould also bind (or fail closed) open docs(research): record the fixture provenance audit and the boundary fixture convention #1461 and fix(libvirt): match the TechVault fakes and lookup absence to captured libvirt shapes #1453. Governance runs locally withRAES_REQUIREMENT_UID=SEM-204, in CI astest_sem_204_governance_passes_for_this_delivery.origin/devcf19e2d7cleanly; carried ci(policy): read git path listings with -z so quoted names reach the gates #1474's 1db1233 byte-identical as 988cc06 (The Isabelle2025-2 Cambridge mirror locator returns 404 #1637).cancel_workflowregression: completions straddling a whole second, reverse order expected; fails ondevmaybe_apply_compensationtest_issue_1462_compensation_order.py, dev's source on the merged tree: 6 of 10 fail['a', 'b'] == ['b', 'a']reconcile_workflow_timeouts; offset-less, offsets, identical,+00:00/Z; contract checks before and after-m integrationcanonical / checks, same runRAES_REQUIREMENT_UID=SEM-204, pass governancetest_issue_1462_policy_ownership.py: 6 of 14 fail without the phase, the governance case without the linksTest Plan
pytest, both #1462 modules and six modules that cancel or time out workflows: 353 passed, none integration-marked. Stash failures ran on the merged tree. Existing governance/policy modules: 375 passed.RAES_REQUIREMENT_UID=SEM-204 check_requirement_governance.py --base-rev origin/dev --require-governanceexits 0. With SEM-204 set,make policy,verify-fast-feedback,verify-changedandcontractspassed; so didlintanddocs-local.Captures
884a8e85(specification) and3fc3ccf9(formal):collect_research_evidence.pyon digestfa973567, thenresearch_capture record. Production pipeline over 6 artifacts: 38 of 42 stages passed (4 preregistered non-executions), load-bearing 10 of 10.replay_caseon 10 retained cases, 4 production CLI cases, 14 participant functions: 20 of 20 observations matched. Both evidence checkers pass.CI run 40232579083 on
50916dcbpassed every job, including integration and all four shards (24 of 24 #1462 cases). Sonar: 0 new issues, new-code coverage 100.0%.Ground Control Checks
make policywith SEM-204: 17 of 17 stages. Self-review only.Traceability
implementations/python/packages/raes_runtime/control_plane_workflows.pyimplementations/python/tests/test_issue_1462_compensation_order.py,implementations/python/tests/test_issue_1462_policy_ownership.pyChecklist
CHANGELOG.mdfrom it)