Repository navigation
Add the pre-registered leverage schedule v1 (G-e, SYN, opt-in; ladder statuses unchanged) - #91
Merged
Conversation
leverage-schedule-v1-20260922 per the user's decision record: a fixed ceiling keyed by session x regime x drawdown ladder, <= 4x intraday and <= 2x overnight, 0 in risk_off/unavailable and on the kill switch, clamped by the broker account multiplier and config max_leverage <= 4, enforced at the policy entry budget and as a ledger backstop that counts pending buys. Opt-in only: the shipped configs carry no leverage_policy and behave byte-identically (golden fixture unchanged). Rung configs 1x/2x/4x scale per-order sizing and loss caps; each run records the achieved peak gross-to-equity leverage and time above the next-lower rung (a rung establishes the envelope at its cap, not a target exposure). Reviewed by three Claude lenses and one read-only Codex cross-family review (gpt-6-astra, high); all findings verified resolved. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gate notes Resolves the source-hashes conflict by regenerating from disk, makes the achieved-leverage integration tests deterministic (trend for complete non-risk_off samples; they cover the receipt, not regime classification), and records the SYN leverage receipt block and the ladder gate notes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…y-20260922 # Conflicts: # docs/ecosystem/index.html # manifests/evidence.json
…y-20260922 # Conflicts: # manifests/evidence.json
…y-20260922 # Conflicts: # docs/ecosystem/index.html # manifests/evidence.json
…y-20260922 # Conflicts: # docs/ecosystem/index.html # manifests/evidence.json
seathatflowsinourveins
added a commit
that referenced
this pull request
Sep 23, 2026
…rted (#96) * Stop committing the generated public explorer; keep evidence manifest sorted docs/ecosystem/index.html (12+ MB, rewritten on every doc change) caused repeated main-branch merge conflicts and made every PR's gitleaks history scan report ~2,322 pre-existing SHA-like strings, avoided only via a --max-target-megabytes 2 coverage hole. GitHub Pages is not enabled, so no live site depended on the committed file. It is now generated locally with `python3 scripts/build_ecosystem.py --write`, gitignored, and published as its own attested release artifact by publish-catalog.yml. scripts/build_ecosystem.py --check no longer compares against a committed file; it builds twice into temporary directories, asserts byte-identical output, and reports input/output digests. Every reader-facing reference to the file was updated to say how to get it now; dated historical records that quote its past committed state were left untouched. manifests/evidence.json's files[] now stays sorted by path for conflict-friendly parallel inserts: a new scripts/evidence_manifest.py --write|--check normalizer/checker, a matching scripts/validate.py rule, and scripts/host_receipts.py's register_file() now inserting at the sorted bisect position instead of always appending. See docs/decisions/2026-09-23-generated-explorer-sorted-manifest.md for the full evidence, alternatives (sharded manifests; release-tag-only commits; GitHub merge queue -- rejected, this repository is a personal-account User, not an organization) and overturn conditions. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Fix round: rebase onto main, scan the built explorer, fix stale docs and artifact-retention wording Fix round on the generated-explorer-sorted-manifest branch, resolving four findings from an independent review: 1. The branch was one commit behind origin/main (base a10de9f; main is now 168a3a8, #91), and #91 touched both files this branch rewrites (docs/ecosystem/index.html, manifests/evidence.json). Rebased onto 168a3a8: the index.html modify/delete conflict resolved to the deletion, and evidence.json resolved to #91's current entries (including its 5 new leverage entries) minus the removed index.html entry, then rehashed with tools/rehash_evidence.py and re-sorted with scripts/evidence_manifest.py --write. The decision record's base-commit note now reflects 168a3a8. 2. The published explorer never went through the private-content scan: validate.py's scan_publication() only walks git-tracked/listed paths, so a freshly built, gitignored artifact was invisible to it. Added scripts/validate.py --scan-file PATH, a standalone mode running the same PRIVATE_CONTENT patterns directly against a file's bytes, and wired publish-catalog.yml to run it on the built explorer immediately before attesting it. 3. docs/ecosystem/README.md still described the old committed-file model (dead index.html link, "download the file from GitHub", stale --check semantics). Rewrote it to match the generate-locally-or-download-the- artifact model. tests/test_adoption_contract.py asserted every adoption/manifest.json sources[] entry is a committed file, which would now fail on a clean checkout for the generated ecosystem_explorer entry; it now explicitly skips that one key (pinning its expected value so the exclusion cannot hide a different broken reference). 4. Every reader-facing reference calling the workflow artifact a "release artifact" overstated its persistence: it is a 7-day-retention artifact from workflow_dispatch/v*-tag runs only, with no GitHub Release. Reworded every occurrence to name the actual retention and trigger scope, and added an overturn condition for when that limitation stops being acceptable. Regression tests: tests/test_validate.py (scan_file_for_private_content unit tests and --scan-file CLI tests), tests/test_adoption_contract.py (pins the ecosystem_explorer exclusion to its exact expected path). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * Run the second determinism build in a separate interpreter with a different hash seed; refresh the record's digests Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Publish only the explorer bytes --check verified; include the template in the input digest Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: seathatflowsinourveins <234074349+seathatflowsinourveins@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
leverage-schedule-v1-20260922(SYN, opt-in), implementing the user's decision record (agent-labdocs/decisions/2026-09-22-leverage-schedule-and-entitlement.md).max_leverage≤ 4.config.jsonandconfig-sip.jsoncarry noleverage_policy; behaviour and the golden fixture are byte-identical.recover(sell-only) is not blocked by the margin check.config-leverage-{1x,2x,4x}.json: each scales per-order sizing and loss caps.leverage.pyis pinned insource-hashes.json. The ladder gate notes are updated; statuses are unchanged because no paper rung has run.Review
wf_15a285a3-93b: Opus design → Sonnet build → three review lenses (risk invariants, default path, evidence honesty) → fix/verify.wf_a84807f8-593: F2 reachability fix → three-lens final review.AchievedLeverageReceiptIntegrationTestswas timing-dependent and failed deterministically on this host. It now forces the trend regime for complete, non-risk_off samples, because the class covers the receipt, not regime classification. 5/5 passes.Evidence
python3 -m unittest: 2330 OK (335 skipped). Engine interpreter: 2330 OK (14 skipped).validate.ymlsteps andtrading_gates.py --checkrc=0.🤖 Generated with Claude Code