Skip to content

Substitute recursive jobs with matched-target and fee accounting - #5754

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/ambitious-ten-02
Oct 27, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
aliromman:codex/ambitious-ten-02

Conversation

@aliromman

@aliromman aliromman commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Adding two recursive invoices does not describe substitution: the outer paid demand and the inner target that serves it must both be removed. Add a checked substitution CLI that consumes one matching target per replaced job, retains all other productive targets and adds an explicit fee invoice once.

The output remains a standard invoice for the existing comparison tools. Source and output hashes, multiplicities and scales are in a separate receipt. The exact identity is F_new(t) = F_outer(t) + sum copies * scale^t * F_inner(t) + F_fees(t). Integer scales, available demand, compatible declarations, strict child-rank reduction and all output limits are checked before writing.

Validation: six new tests pass normally and under optimized Python 3.12. They cover literal multiple-target accounting, 144 models with 432 exact moment identities, repeated demands, unchanged inputs, circular/missing interfaces, fractional scales, fee credits, overflow and no partial CLI output. Five existing composition tests and git diff --check pass.

Scope: arithmetic composition under declared contracts. Matching native interfaces, scale lifting, independent coproduct ownership and completeness of fees remain physical proof obligations. An empty explicit fee invoice does not prove free adaptation. The guide includes the identity and open next questions. No κ or selected-frontier claim.

This builds on the existing signed-invoice and integer-composition tools. PR4167's actual closed-primitive protocol is distinct and unchanged. The canonical scope is Discussion5752; live main, priorities8, open PRs and recent Discussions were refreshed. Bounded file-list coverage and API failures remain disclosed. Hosted CI and independent review are pending.

Base: de5ec2e7a6074068452f45b1a191b5c72832df4a. Verified head: b00030ff4a084b2302d7cdf23258ab6fcb6e4b64.

Prepared for Ali Romman with substantial OpenAI Codex assistance. Retained tool and mathematical predecessor credits apply. No selected-frontier change.

Validation closeout: the ten independent patches apply cleanly together. The combined Python 3.12.14 run passes all 69 new tests and 35 existing checks, normally and under -O; the optional SymPy check is skipped. All 6 new tests in this PR also pass in the hosted planning log. The planning job reports eight failures and two errors in unchanged test_research_current_assignment; the full unchanged module reproduces those same failures locally on priority revision 8. The downstream replay job is skipped. This is not a green hosted workflow. Combined evidence and remaining obligations are in Discussion #5752.

@Mister-Meeseeks
Mister-Meeseeks merged commit 3585bbe into CrocSwap:main Oct 27, 2026
1 of 2 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.

2 participants