Skip to content

V47 Gate 7: E2E IP Selling And Buying Tests#239

Merged
geraldarthurdavis merged 1 commit into
version/v47from
v47/gate-7-e2e-ip-selling-buying-tests
Jun 11, 2026
Merged

V47 Gate 7: E2E IP Selling And Buying Tests#239
geraldarthurdavis merged 1 commit into
version/v47from
v47/gate-7-e2e-ip-selling-buying-tests

Conversation

@geraldarthurdavis

Copy link
Copy Markdown
Contributor

Summary

Closes V47 Gate 7 (E2E IP Selling And Buying Tests) into version/v47 while V46 remains active canon.

  • Browser proof (uapi/tests/e2e/commercial-mvp.ip-exchange.spec.ts, run via test:e2e:ip-exchange): three Playwright tests prove both sides of Bitcode in deterministic mock mode — the first browser-level coverage of the /deposit, /read, and /packs launch routes:
    1. IP seller deposits an AssetPack: source connection gates option synthesis; source-safe measurements (BTD potential, BTC source-to-shares preview, option roots) render before approval; "Approve for Depository" produces admission readback; the flow journals pipeline:deposit-option-synthesis rows through a stateful execution-history mock; /packs?type=depository-assetpack stays reachable.
    2. IP buyer measures, quotes, settles: the five-step session renders the fit measurement review (Need coverage → delivery readiness), final BTD scalar (120 BTD), and deterministic BTC-testnet quote basis before payment; payment observation → finality → BTD rights receipt → repository PR delivery read back in order with receipt roots in the expandable proof detail; /packs?type=settled-assetpack reachable.
    3. Packs dashboard audit: master-detail State readback tracks btc-finality-confirmedbtd-rights-transferred → delivery, and the fail-closed Repair surface lists commodity-state blockers.
      All tests run behind a browser error trap (fails on framework overlays/console errors). Local run: 3 passed in ~32s.
  • Protocol law: new V47E2eIpSellingBuyingTests object (17 predicates) binding the spec scenarios, harness, scripts, and workflows; checker runs file/predicate validation in CI with browser execution opt-in via --run-browser-tests.
  • Spec family: SPEC, DELTA, NOTES, PARITY ("E2E IP exchange tests" row → implemented; promotion pending), roadmap (Gate 7 closure target/anchor; posture working=Gate 7, latest closed=Gate 6); Gate 2–6 artifacts regenerated.

Validation

  • test:e2e:ip-exchange: 3 browser proofs pass locally
  • pnpm --filter @bitcode/protocol test (230 pass)
  • check:v47-gate1 (skip-branch-check) through check:v47-gate7 all pass
  • Spec-family promoted V46 + draft V47, canonical inputs, canon posture drift, spec quality (basic), import casing, uapi eslint + tsc --noEmit, git diff --check all clean

🤖 Generated with Claude Code

Record Gate 7 E2E IP selling/buying law across BITCODE_SPEC_V47, DELTA,
NOTES, PARITY, and the roadmap, and advance roadmap posture to working
Gate 7 with Gate 6 recorded as latest closed.

Add commercial-mvp.ip-exchange.spec.ts: a deterministic mock-mode Playwright
proof that sells IP on /deposit (source connection gates synthesis,
source-safe measurement review precedes approval, admission readback
synchronizes to /packs, execution rows journal through a stateful
execution-history mock), buys synthesized IP on /read (five-step session,
fit measurement review with final BTD scalar and BTC-testnet quote basis
before payment, ordered observation/finality/BTD-rights/PR-delivery
readback, rights and delivery receipt roots in the expandable proof detail),
and audits /packs state readback with the fail-closed repair surface — all
behind a browser error trap. Expose test:e2e:ip-exchange in uapi.

Add the V47E2eIpSellingBuyingTests protocol object, generator, Gate 7
checker (browser tests opt-in via --run-browser-tests), protocol tests,
package exports, package.json scripts, and gate/canon workflow wiring;
generate .bitcode/v47-e2e-ip-selling-buying-tests.json and refresh the
Gate 2-6 artifacts against the advanced spec family.

Validated with:
- pnpm --dir uapi run test:e2e:ip-exchange (3 browser proofs pass)
- pnpm --filter @bitcode/protocol test
- node scripts/check-v47-gate1-scope-measurement-launch-freeze.mjs --skip-branch-check
- pnpm run check:v47-gate2 through check:v47-gate7
- node scripts/check-bitcode-spec-family.mjs --version V46 --mode promoted --current-target V46
- node scripts/check-bitcode-spec-family.mjs --version V47 --mode draft --current-target V46
- node scripts/check-bitcode-canonical-inputs.mjs --current-target V46
- node scripts/check-bitcode-canon-posture-drift.mjs --active-canon V46 --draft-target V47
- node scripts/run-bitcode-spec-quality.mjs --mode basic
- node scripts/check-import-casing.mjs
- uapi eslint and tsc --noEmit on the new spec
- git diff --check

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
engi-uapi Ready Ready Preview, Comment Jun 11, 2026 7:47pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b3f9682d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


// The deposit flow journaled source-safe execution rows: synthesis first,
// then the review/admission decisions.
expect.poll(() => history.journaledRequests().length).toBeGreaterThanOrEqual(2);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Await the journaled-request poll

In this seller-flow proof, the expect.poll(...).toBeGreaterThanOrEqual(2) promise is never awaited, so the test can continue and pass without waiting for or enforcing that the deposit flow actually journaled the expected execution rows. In scenarios where journaling is delayed or broken, this assertion is effectively detached from the test result; add await so the browser proof fails when the required rows are not produced.

Useful? React with 👍 / 👎.

@geraldarthurdavis
geraldarthurdavis merged commit 765e3d9 into version/v47 Jun 11, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant