Skip to content

Docs: capabilities-matrix throw / try / catch rows (post-#195/#57) #2103

Description

@PurHur

Problem

Contributors still need a single regen + drift story for throw/try/catch matrix rows even though much of the implementation landed:

Item Status on master
#57 try/catch/finally ✅ closed
#2076 / 007-ThrowsWeb ✅ closed
#2084 PHPT overlay ✅ (VM catch path)
throwsWebNorthStarDefinitions() in script/capability-syntax-lib.php ✅ present (~L1121)
Committed docs/capabilities-syntax.md throws section may lag generator output
#195 throw expressions still open (edge semantics / JIT)

Presenters auditing subset coverage should not grep lib/ — they should read regenerated matrices aligned with ROADMAP #78 Phase 1.

Goal

  1. Regenerate and commit matrix outputs:
    php script/capability-matrix.php
    php script/capability-syntax.php
  2. Verify Throws reference (examples/007-ThrowsWeb) block in docs/capabilities-syntax.md matches throwsWebNorthStarDefinitions() (construct, VM serve, AOT link/execute rows).
  3. Add optional drift guard script/check-capabilities-throws-sync.php (local only; opt-in CAPABILITIES_THROWS_SYNC_GATE in ci-fast follow-up — mirror Docs: capabilities-matrix OOP rows (class methods, visibility, constructors) #2190 OOP pattern).
  4. Footnote Language: throw expressions and Exception object propagation #195 / JIT: try/catch/finally lowering phase 2 (#57, after VM #2084) #2114 where JIT/AOT columns are still partial.

Implementation hints

File Notes
script/capability-syntax-lib.php throwsWebNorthStarDefinitions() — SSOT for 007 rows; extend only if new 007 gates land
script/capability-syntax.php renderThrowsWebNorthStarMarkdown() appended to syntax doc
docs/capabilities-syntax.md Committed output — diff after regen
docs/capabilities.md Builtin-level throw/catch if capability-matrix.php has hooks
script/check-wave3-roadmap-sync.php Must still pass after footnote edits
test/unit/CapabilitySyntaxTest.php Assert throws section contains 007-ThrowsWeb + issue links

Row content checklist

Verification commands

php script/capability-syntax.php && git diff --stat docs/capabilities-syntax.md
php script/check-wave3-roadmap-sync.php
./script/ci-fast.sh --filter CapabilitySyntax

Harness:

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php script/capability-syntax.php && grep -F 007-ThrowsWeb docs/capabilities-syntax.md'

Do not use raw docker run -v "$(pwd):/compiler" on Runforge.

Acceptance criteria

Dependencies

Links

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions