test: bound all-op permutations and verify exact link ports - #185
Draft
christian-byrne wants to merge 1 commit into
Draft
christian-byrne wants to merge 1 commit into
christian-byrne wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bounds the normal all-op run.
Preserves the larger opt-in corpus.
Detects misplaced link references.
Full context for agent readers
Scope and authority
Christian Byrne approved stamped link ownership and broader operation interactions in the link-ownership and all-op request. The production ownership implementation already landed in the stamped-link fix, followed by the all-op corpus and promoted-connect coverage. This PR does not duplicate or alter the applier.
The standalone retirement notice is superseded by Christian's later decision to keep this repository canonical. The frontend migration remains open. No ownership, workflow, reviewer, or frontend changes are included. Leave this PR unmerged.
Bounded corpus and retained extended coverage
The original corpus exceeded the contributor guide's normal 20,000-case/eight-minute budget. The default now evaluates exactly:
49 ordered kind pairs × 8 preconditions × 2 ordered actor pairs × 3 stamp relations × 2 arrival orders × 2 batch modes = 9,408 executions.The kinds come from the package declarations:
add_node,connect,disconnect,set_widget,delete_node,clear, and deferred/rejectedreset_doc. Preconditions remain present-valid, missing source, missing destination, source/destination slot out of range, occupied input, interior/inputcount, and promoted/autogrow. Actor classes are one agent and one human, in both directions; stamp relations are equal, lower, and higher.Another 5,000 fixed-seed length-3-to-6 streams run in original and permuted orders: 10,000 executions. Seed is 83297540, shrinking remains enabled, and nonzero per-kind hit checks remain mandatory. Total: 19,408 primary stream executions, with a 20,000-execution/eight-minute file budget. Auxiliary retry and rejection probes are not counted as primary streams. The budget checks run between synchronous executions and after each test; exhaustion fails, never returns a partial green result. These are cooperative deadline checks, not preemption of a single stuck applier call.
The existing 200,000-execution corpus remains available with
CMP_PERMUTATION_PROFILE=extended: 150,528 pair executions plus 24,736 sampled streams × two orders. Its original actor/stamp domains and seed are preserved. The whole file has an explicit 30-minute ceiling, replacing two separate 15-minute allowances.Stronger link coherence
The duplicate-link matrix previously checked the winning tuple, unique link identity, and two live references. It now asserts exactly which input/output ports own those references and requires every other port to be empty. This strengthens the existing 12,288 both-order/both-batching executions and six language-neutral parity executions.
The independently expected owner still follows the embedded stamp, including the fixture where envelope ordering implies the opposite winner. Production code and fixtures are unchanged.
Exact-head verification
Head: bounded corpus and exact-port assertions. Base: standalone main.
npm test -- --maxWorkers=2passed, 77 files / 976 tests, 109.24 seconds.Three local fault probes were restored before final verification:
(toIdx + 1) % ins.lengthwhile leaving the tuple intact. Predicted: old parity test passes, strengthened parity test fails. Observed: exactly one pass / one failure, withexpected '700' to be nullat the new exact-port assertion. The two unselected matrix tests were skipped only for this probe.bounded runtime budget (ms): expected 480002.9544 to be less than 480000.bounded execution budget: expected 20001 to be less than or equal to 20000.No production mutation remains. These are local mutation reds on already-shipped behavior, not a new production fix or a hosted red/green claim. Standalone build/test CI remains retired; no hosted green claim is made and no workflows are restored or manually triggered.
Reproduce:
Limits and overlap
Neither mode exhausts arbitrary graphs, payloads, histories, or all causal interleavings. The existing classifier still permits declared state-dependent/batch-abort differences and narrowly normalizes known divergence families. The bounded run observed 12 pair comparisons and seven sampled comparisons with unrelated-delete link aliases, plus four sampled inputcount/link-reuse differences. Passing does not certify global convergence or retire those risks. No classifier or invariant exceptions were changed.
The concurrently opened lifecycle/continuation extension changes a different test file and leaves this generator/classifier untouched. The changes are complementary, not duplicate PRs. No review threads are addressed by this PR.
Affected invariants: KA-2 (embedded offline-evaluable ordering), KA-4 (determinism/idempotency), and KA-3 / FC-3 (one portable applier, no server-only dependency). Production behavior is unchanged; no browser-visible or cross-language runtime claim is made.
Glossary: corpus = selected test scenarios; stamp = ordered counter/actor/operation-ID key; normalized link identity =
String(link_id); parity vector = language-neutral expected case; oracle = correctness assertions; shrinking = reducing a failing generated case; KA/FC = keep-alive/foreclose invariant identifiers; CI = hosted automated checks; PR = pull request.