Skip to content

Emit immutable compiled execution capability receipts (capability extension v1) - #167

Merged
luisleo526 merged 1 commit into
mainfrom
lv/f08-capabilities
Oct 4, 2026
Merged

luisleo526 merged 1 commit into
mainfrom
lv/f08-capabilities

Conversation

@luisleo526

Copy link
Copy Markdown
Contributor

Summary

Generated strategies now export an immutable execution capability receipt (capability extension v1), which the native live runner reads to decide close-only stream admission before a deployment starts.

  • The receipt lists the compiled strategy() execution declarations, with positional arguments mapped to their parameter names. It also lists every request.* site, including sites lowered to a runtime error because no data is pinned, and runtime requirements such as auxiliary or native feeds, the FX curve, recorded series and intrabar persistence.
  • Any declaration that does not resolve to a literal, and the bar-state builtins that behave differently in realtime, are listed under unresolved, so the runner refuses them by name.
  • The analysis adds a single AST walk, so transpile time stays within the existing performance budget.
  • The receipt uses canonical JSON, the checked-settings buffer protocol and deterministic ordering. Its contract is documented in docs/PUBLIC_CONTRACT.md.

Verification

  • pytest on CLOUD: the full suite passes, and the corpus compiles 314/314.
  • Pytest cases per declaration, plus positional and non-literal forms.
  • The engine-side runner end-to-end tests use libraries emitted by this change.
  • A coordinated parity sweep with the paired engine change.
  • Three independent reviews; the last verdict is MERGE.

🤖 Generated with Claude Code

Add the optional versioned generated-strategy capability ABI for the next release. Resolve positional strategy declarations in Pine order, retain unresolved literals and unpinned request sites, and collect request, feed, FX, intrabar and endpoint/realtime requirements in one AST walk.

Cover canonical receipts and conservative runner admission with generated fixtures and compile tests. Document display-only refusal, legacy warning compatibility and receipt limitations. Add Unreleased notes while preserving all released sections and default batch computation.
@luisleo526
luisleo526 merged commit 463a9af into main Oct 4, 2026
9 checks passed
@luisleo526
luisleo526 deleted the lv/f08-capabilities branch October 4, 2026 12:18
luisleo526 added a commit that referenced this pull request Oct 5, 2026
* docs: changelog and version scoping for 1.2.0

1.2.0 pairs with engine v1.2.0, whose pineforge.h defines
PF_CAPABILITIES_API_VERSION and declares the two capability functions
(engine #332) that the C++ of codegen 1.2.0 defines (#167). The changelog
section takes in the Unreleased notes and covers #166, #167, #168 and
#171: the capability receipt and what the live runner does with it, the
diagnostic codes and catalog, the first error in source order, the
linear-time classification as a security fix, the PineForge Source
License 1.1 and the pairing and migration steps. The Python and JSON
contract is additive; the engine's report harness is unchanged since
v1.1.0, so no report key changes.

The README, AGENTS.md / CLAUDE.md, CONTRIBUTING.md,
docs/PUBLIC_CONTRACT.md and docs/pine-cap-activation.md name 1.2.0 where
they named 1.1.0 as the current release or pair, the pairing table gets
a 1.2.0 row, the license badge reads 1.1, and the npm README lists the
catalog and LICENSE the package now carries. The release scoreboard
sentence and the pf markers are left to the release lane.

Measured for 1.2.0: the engine's 325 corpus sources and the 277 gate
fixtures transpile, with the capability block removed, to 1.1.0's C++
byte for byte, each in a fresh process (13 refusals, same messages), and
each in under 0.1 s on CPython 3.14.6 on an Apple M4 Max. The tutorial
run of the quick-start C++ against engine main 44eab7b1 (Linux x86_64,
GCC 13) prints 9 trades and +738.20, and 13 trades with the old sizing
declared, as 1.1.0 with engine v1.1.0 does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* docs: release 1.2.0's grades from the facts tokens

README: the release sentence names 1.2.0 and renders releases[1.2.0]
(baseline pineforge-parity-baseline-20261005-engine-52292db9, 7,970
excellent / 19 strong of 7,989), and the scoreboard of main renders the
same baseline, from pineforge-release facts/facts.json as exported for the
1.2.0 release (sha256 c2f438f0). CHANGELOG: the 1.2.0 documentation entry
states the release's grades, as 1.1.0's does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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