Skip to content

add(bound_tree): expose analysis APIs - #979

Merged
odvcencio merged 1 commit into
mainfrom
codex/bound-tree-analysis
Aug 25, 2026
Merged

add(bound_tree): expose analysis APIs#979
odvcencio merged 1 commit into
mainfrom
codex/bound-tree-analysis

Conversation

@odvcencio

Copy link
Copy Markdown
Owner

Summary

  • expose parse stop reasons and runtime diagnostics through BoundTree
  • let FactProgram extract facts from a BoundTree
  • let Outliner project symbols from a BoundTree
  • preserve the existing nil, language, query, and receipt behavior
  • keep the owned raw tree private

These methods remove duplicate parses for callers that receive bound trees from grammar gateways.

Canopy #23 uses parser receipts. It can adopt these bound analysis paths after release.

Validation

  • focused API tests in the repository Docker harness
  • focused race tests in the repository Docker harness
  • go vet . in the repository Docker harness
  • direct Canopy symbol inspection for all new methods
  • git diff --check

- Add parse receipt accessors to BoundTree. Expose ParseStopReason, ParseStoppedEarly, and ParseRuntime to read parse diagnostics.
- Add BoundTree wrappers for Extract and Outline. Delegate to the underlying Tree methods. Guard against nil inputs.
- Add unit tests for the parse receipt methods. Verify wrapper output matches the Tree baseline.

Buckley-Change-Hash: sha256:fc15393393eca02365306ef4bbc155658a0ac6303572b3304635b0e740e2285d
Buckley-Change-Stats: files=6 insertions=110 deletions=0 binaries=0
@odvcencio
odvcencio merged commit c2b78c5 into main Aug 25, 2026
49 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.

1 participant