test: make eight omowright assertions able to fail - #30
Merged
Merged
Conversation
- bridge-transport: the background.js source grep becomes a node:vm run of the real extension script against a fake chrome (unknown command answered as protocolError, reconnects past six attempts at a capped backoff, hello lists equal COMMAND_NAMES/EVENT_NAMES); the collision check asserts COMMAND_NAMES excludes protocolError instead of comparing two literals. - agent-tabs: await the disposed-create rejection; the fake attachPage records itself so the activate-before-attach order is asserted; the close test is renamed to what it tests and drops its duplicated capability check. - dialogs: the normalizeDialogPolicy identity test folds into the object-policy boundary test as a function-policy row. - skill-docs / integration / cloak-profile / layers: drop the machine-local install check, two typeof probes and a vacuous second toast assertion.
Closed
3 tasks
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.
Summary
This PR changes eight omowright tests (lane omowright) so their assertions can fail, and removes the probes that already had stronger owners. Each repair has a mutation proof below.
Candidates (lane omowright)
bridge-transport.test.mjs, "extension protocol errors use a dedicated response name and reconnect indefinitely")background.jsinnode:vmagainst a fakechrome. It checks that an unknown command is answered asprotocolError, that the capped backoff keeps reconnecting past six attempts, and that the hello lists equalCOMMAND_NAMES/EVENT_NAMES.COMMAND_NAMES.includes("protocolError") === falseattachPagerecords itself, so activate-before-attach is asserted. The close test is renamed to what it checks, and its duplicated capability assertion goes;close failure leaves target owned...keeps timeout retention.object dialogPolicy can dismiss and supply promptText, next toPipeCdpClient default dialogPolicy auto-acceptsskill-docs.test.mjs: the in-repo frontmatter-name and referenced-doc-path testsframes-snapshotandinteractiontests click ref locators for real;cloak-profilecalls the function on the next lineblocking === nullremains, with the message of the contract it enforces.Deferred: none.
Baseline gate (unedited base
13567bbc)The seven touched files, in both runners: bun 63 pass, 0 fail;
node --test63 tests, 63 pass. After this change: bun 61 pass, 0 fail; node 61 tests, 61 pass.Mutation proofs
In each case the production owner was mutated, the repaired test was run, and then the owner was restored.
git diff --quiet -- src bridgeexits 0 afterwards.Audit numstat (frozen measurement tool, merge-base..head)
Removed: test 37, support 0, prod 0. Added: test 40, support 0, prod 0. Test files delta: 0.
Validation
Full suites on a clean checkout of this commit on a local macOS arm64 machine:
bun run test: 217 pass, 0 failbun run test:node: 217 tests, 217 passgit diff --check: cleanRefs #28
Summary by cubic
Repairs eight omowright test assertions so they can actually fail, and removes redundant probes that weaker assertions masked.
bridge-transport.test.mjsnow runs the realbackground.jsinnode:vmagainst a fakechrome, asserting theprotocolErrorresponse name, reconnects past six attempts, and hello lists matchingCOMMAND_NAMES/EVENT_NAMES; the collision check now assertsCOMMAND_NAMESexcludesprotocolErrorinstead of comparing two literals.agent-tabs.test.mjsawaits the disposed-create rejection, records the fakeattachPageso activation-before-attach is asserted, and narrows the close test to what it checks.dialogs.test.mjsfolds thenormalizeDialogPolicyidentity cases into the object-policy test as a function-policy row.skill-docs.test.mjs, twotypeofprobes (integration,cloak-profile), and a vacuous toast assertion inlayers.test.mjs.Written for commit 03d786f. Summary will update on new commits.