Repository navigation
Live runner: refuse compiled strategies a close-only stream cannot honour (capability receipt v1) - #332
Merged
Conversation
Add an optional versioned capability receipt and conservative pre-ledger admission. Record compiled execution declarations and analyzed request/feed requirements, refuse unsupported or unresolved requirements by name, and bind receipt bytes before the routing identity wrap. Cover generated-library refusals, receipt protocol and determinism, legacy warning compatibility, changed-receipt recovery and admitted-class batch/stream equivalence. Document display-only builtin refusal and the unchanged conservative request and POOC policy. This additive extension belongs to the next release. Record it under Unreleased without changing the released notes, base C ABI version, kernel, matching, margin or default batch computation.
A legacy example library without a capability receipt now prints the documented warning at startup; the routing test parses the remaining stderr lines as delivery-error JSON, so it must skip that line like the checked settings warning. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
luisleo526
added a commit
that referenced
this pull request
Oct 5, 2026
* docs: release notes and version scoping for v1.2.0 CHANGELOG: the Unreleased section becomes 1.2.0 (2026-10-05), a minor release that adds the compiled execution-capabilities extension to the C ABI (PF_CAPABILITIES_API_VERSION, strategy_capabilities_api_version, strategy_capabilities_receipt). One bullet per change since v1.1.0 with its PR (#328, #330, #331, #332, #333, #334, #335, #336, #337, #338 and the session-clock change, written #VCP until its PR number exists), the recipe additions under State hashes (#328, #330, #335; domain tags and epoch unchanged), Report keys (docker/run_json.py is byte-identical to v1.1.0's, so no key changes) and Migration. Version scoping: README, install and public-contract pages name v1.2.0 and codegen 1.2.0; "since the next release" and "fixed on main" in the capabilities guide and the runner guide become 1.2.0 and 1.1.0 (#325). Lines that state what an earlier release shipped stay. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs: 1.2.0's grades from the facts tokens, #339, and codegen's license - CHANGELOG: the session-clock change is #339 (merged as 52292db), in place of the #VCP token of 3082fbd; the "What a script author sees" bullet of 3082fbd now states release 1.2.0's grades (registry baseline pineforge-parity-baseline-20261005-engine-52292db9: 7,970 excellent / 19 strong of 7,989, none below strong) instead of the main scoreboard at 6b77f06. - README: the release sentence names 1.2.0 and renders releases[1.2.0], and the main scoreboard renders the same baseline, from pineforge-release facts/facts.json at 0c2f6838 (the facts export for the 1.2.0 release). - README, LEGAL.md, docs/pages/index.md: pineforge-codegen is under the PineForge Source License 1.1 from its release 1.2.0; releases up to 1.1.0 keep the PolyForm Noncommercial terms they shipped with. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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
The native live runner can now prove, before it binds a ledger, that a compiled strategy library is eligible for its close-only stream. It refuses by name any library whose declarations that stream cannot honour. Before this change, a library that needed intrabar calculation or other non-close-only behaviour could run close-only and silently compute a different strategy.
dlsym, like the checked-settings extension:strategy_capabilities_api_version()returns 1;strategy_capabilities_receipt(...)returns canonical JSON through the checked-settings buffer protocol;PF_ABI_VERSION, the kernel and every batch path are unchanged.calc_on_every_tick,calc_on_order_fills,calc_on_every_history_tick,process_orders_on_closeanduse_bar_magnifierwhen true;request.*, including request sites whose data is not pinned;barstate.islast,barstate.islastconfirmedhistory,last_bar_index,last_bar_time,barstate.isrealtime,timenow. This includes display-only use;The receipt is bound into the deployment identity, so a changed receipt on resume is refused. A legacy library without the extension warns and runs, under the same policy as checked settings.
docs/strategy-capabilities.mdandrunner/README.mdsay exactly what is refused and why, with a link to "Backtest vs live". Refusing requests and POOC is deliberately conservative; shapes that the stream equivalence tests prove can be admitted in a later change.Verification
pineforge/verify) and a coordinated parity sweep with the paired codegen change (pineforge/parity).🤖 Generated with Claude Code