Repository navigation
Complete deterministic clearing, bounty and order contracts (#71–#73) - #103
LIghtJUNction wants to merge 24 commits into
Conversation
…bitration Implement #73, #74 and #75. Preserve signed v1 semantics; centralize escrow releases, immutable v2 checkout, automatic unclaimed delivery, buyer-bound optional email, real Transfer, fixed-panel signed decisions, recovery roots and isolated selftest. Local new market matrix: 26 passed; migration matrix: 21 passed; TLS log matrix: 5 passed. Production is untouched.
Refs #71, #72, #73. Add named ledger legs, console bank funding, bounded hosting redemption, proof-of-possession bounty and versioned escrow delivery/refund state machines. Includes isolated selftest, migration, recovery and authorization regressions. Candidate requires complete PR CI before merge; no production changes.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Refs #71, #72, #73, #104. Preserve current main and all market changes; reuse the six reviewed CI-only blobs from ae64f40. Remove the conftest alias collision and require all four disjoint test partitions, conformance and build. No application semantics or production effects change in this integration.
…gration Refs #71, #72, #73. Fix all seven observed CI failures without dropping historical assertions: capture every pinned legacy column and verify additive market defaults separately; distinguish read-only clearing inspection from the isolated market E2E. Add a negative inspection case and assert doctor never writes market, identity, event, audit or result rows. The complete 5d7b575 CI ran 1038 tests: 1031 passed and 7 failed in these two expectations. Focused local verification after this change: 51 market tests and 26 migration/config tests passed on Python 3.13/PostgreSQL 17. The required complete Python 3.15/PostgreSQL 16/Valkey CI remains authoritative.
|
Continuation for #71–#73 is now at b8d3e3b. Integrated the CI-only #104 commit rather than duplicating its fix. The real Python 3.15 / PostgreSQL 16 / Valkey CI on 5d7b575 ran all 1,038 core tests: 1,031 passed, 7 failed, 0 skipped. All seven failures were in two stale expectations: six old-backup comparisons used The new commit preserves comparison of every pinned legacy field, sequence, supply, balances and historical receipt, and separately checks additive defaults/no fabricated order events or purchases. Fault-injection rollback still requires the exact original schema. Doctor now has positive and failed-inspection cases, checks all money/bounty/order feature results against Focused local verification: 51 market tests passed and 26 migration/config tests passed on disposable Python 3.13 / PostgreSQL 17. These do not substitute for the target environment. Current-head full CI is 36352138041, including all four complete partitions, conformance and package build. Do not merge or close the issues based on the local counts while that gate is pending. The helper source/dependency export workflow remains on its separate disposable branch, not in this PR. |
…lel fixes Refs #71, #72, #73. Include main 4a9378d: the eleven files changed since the shared ae64f40 ancestor do not overlap market changes. Preserve their exact blobs, including Registry schema ownership/local reference policy, TUI recovery, safe restore configuration, effect retry tests and dependency declaration. Retain both parents and rerun complete combined CI; prior isolated/local results are not evidence for this combined tree.
Refs #71, #72, #73. Preserve main b1ac767's exact worker and regression-test blobs. This enforces expired notification lease deadlines without altering market contracts. Keep both parents so the final complete CI covers the same source tree that will be merged, rather than relying on separate branch successes.
|
Final integration head is now ae1d940, tree 45ddcbe724197e6371daecf7448831724588a976. It includes main b1ac767 and preserves #109's exact two lease-fencing blobs. This supersedes the prior c765205 gate; cancelled/superseded runs must not count as successful evidence. Required complete current-head CI: 36352976244. Before the final two-file main update, the exact c765205 combined tree additionally passed 117 local integration tests, including new Registry/TUI/backup/retry checks, market contracts, purchase recovery, money configuration and the official isolated selftest. The local source was reconstructed from pinned build artifacts and matched the Git tree hash, not assumed to match by branch name. The final ae1d940 tree has also been hash-verified locally and its affected notification/market regressions are running. No force push, test exclusion, protection bypass, production operation or issue closure was performed. The PR description's final verification block will be replaced with completed exact-head evidence before merging. |
…ntegrate main Merge main through 4a9378d, preserving market notification/recovery hooks. Reject absent, substituted and unavailable case rationale bytes before voting or escrow execution; retain the exact reason across backup and restore. The missing-rationale regression fails against 0b88bbf and passes with the fix. Integrated PostgreSQL regression: 126 passed, zero skips. Harden the four-shard CI gate to verify actual node IDs and reject skipped evidence. Verified source tree: 95fe3ff.
Integrate b1ac767 and synchronize the order-only email projection when the current worker discovers its own lease expired. Do not requeue expired work, claim goods, alter settlement or override a disabled buyer endpoint. The new real-checkout regression fails on the previous merge candidate: email_status stays queued while the job is uncertain. Cover finish/retry and enabled/disabled endpoint combinations with no outbound mail. Source tree: 98058a6.
…fication Integrate main 3cdcae4: keep its version-2 manifest and msg.nodeid identity format, all new identity/class/parameter regressions, plus this PR's skip/duplicate-ID rejection and actual two-shard completeness test. No application source changes. Real combined CI/fixture regression: 29 passed, zero skips. Source tree matches local 901703a. Previously verified f9fba26 business tree: 145 integrated PostgreSQL tests, 24 transport tests, 8 conformance tests and build/install smoke passed.
Refs #71, #72, #73. Preserve the existing market implementation and add seven regression cases for changed historical facts, corrupt additive defaults, immutable ledger legs, missing market schema and the real isolated market selftest. Ensure interrupted migrations leave no new market tables and doctor cannot run a transaction selftest.
|
Conflict resolution complete. The branch now contains current |
|
2026-09-28 审计与并行交接:本 PR 归任务 B,C 为唯一串行合并负责人,当前 main 已前进到 已独立校验运行 先与 #102 的市场实现整合:保留 orders.buy@1/@2 的原义及完整 @3、受保护 escrow debit、买家绑定交付/邮件、确定性仲裁、不可变签署账本与恢复。不要将旧重复 order_engine 或过时 CI/fixture 修复直接覆盖 main,也不要放宽未知 ledger 引用拒绝。代码共享接线和旧迁移语义分别与 C/A 对齐。 旧 body 的 c765... 与旧 CI 不代表当前 head |
|
A→B 源码交叉核验交接(仅Refs,不合并、不将源码阅读当现场验收)。审查版本
A实际修复现在在 #116(stacked on #112,head c97a528),新 |
Scope
Refs #71, #72, #73. Implementation against the authoritative design, with shared financial transaction invariants. Do not merge or close these issues until the current combined-head full CI succeeds.
money bank fundwith two separate confirmations before PIN unlock, versioned offer snapshots and a real Registry-backedhosting_bytes_v1entitlement.money.redeem@1keeps its published input/short code; @2 adds pending redemption. Pending/settle/refund and purchase recovery share the ledger transaction. Empty offers and zero issuance remain the defaults; buying capacity does not grant authorization.market_e2e. The selftest parses the real console command, mints/funds 20 MSG, pre-escrows/claims 10, buys the fixed text+hello.txt bundle for 5, verifies buyer=5/bank=15/escrow=0/supply=20, and retries without a second payment. PoP is explicitly NOT human or Sybil resistance.delivery.claimis separately signed and never moves money.Integration and verification
Current combined head: c765205, incorporating main 4a9378d without overwriting its eleven non-overlapping changed files. This retains the CI-only #104 collection repair and complete four-shard evidence gate, the parallel TUI/restore/retry improvements, and the Registry's owned/local-only schema validation.
Current-head required CI: 36352563634 — pending verification. It must run every collected core test, all real transports/tokenizer conformance and the installable build under Python 3.15, PostgreSQL 16 and Valkey. No test allowlist, skipped failing tests, xfail or longer timeout was introduced.
The complete earlier CI on 5d7b575 ran 1,038 tests: 1,031 passed, 7 failed, 0 skipped. The seven failures were six legacy
SELECT *comparisons across legitimate additive columns and one obsolete doctor expectation. Commit b8d3e3b fixes those expectations without weakening the invariants: every original legacy column/receipt, sequence, supply and balance is compared, new defaults are checked separately, and rollback must restore the exact old schema. Doctor has both successful and failed clearing-inspection cases, never claimsmarket_e2e, and may not change financial, identity, event, audit or result rows. The previously suspected Git ingress failure did not reproduce in the complete correctly provisioned run.Focused local evidence for the market/test-fix tree on disposable Python 3.13 / PostgreSQL 17: 51 market tests, 26 migration/config tests, 18 collection/shard-gate tests, and 2 official isolated selftest tests all passed. These separate groups do not replace the target-environment combined-head CI above.
Compatibility / boundaries
Migration adds typed purchase escrow, named ledger legs, order quote/deadline facts and append-only order events without rewriting historical signed receipts. Existing escrow-v1 orders retain explicit acceptance; new automatic behavior requires a versioned policy. CLI, configuration sample, bootstrap/doctor/selftest and docs are updated together.
docs/MARKET_CLEARING.mddocuments commands, limits and irreversible delivery points. Email endpoint ownership/SMTP and large delivery transport remain #74; arbitration panels/quorum/appeals/signed split decisions remain #75. Subjective disputes stay held unless the seller refunds; unsupported facilities fail closed. Production gate #84 remains separate. No deployment, production mint/funding, live bank registration or live offers were performed.The temporary source/dependency export workflow is NOT included in this feature branch.