Skip to content

refactor(runtime-tags): list the analysis phases at program exit - #4524

Merged
DylanPiercey merged 1 commit into
mainfrom
dpiercey-ws-persisted-pages-xh8764-main-fixes.program-exit-phases
Oct 24, 2026
Merged

DylanPiercey merged 1 commit into
mainfrom
dpiercey-ws-persisted-pages-xh8764-main-fixes.program-exit-phases

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

finalizeReferences() ran reference resolution, the finalizers, the whole reason solve, module registrations and id allocation, so the program visitor's exit, the one place that orders analysis phases, showed a single call for most of them. It now ends where references settle and returns each section's intersections, and the exit calls solveReasons(), finalizeRegistrations() and allocateIds() itself. A step added later lands visibly before or after the solve; a finalizer that reads reasons was the bug this boundary would have made obvious. Each read map is now cleared by its last reader, and AGENTS.md and RESUMABILITY.md name the phase each fact settles in. No output change.

🤖 Generated with Claude Code

`finalizeReferences()` ran reference resolution, the finalizers, the whole
reason solve, module registrations and id allocation, so the program visitor's
exit, the one place that orders phases, showed one call for most of them.
`finalizeReferences()` now ends where references settle (after the reason
expressions tags add) and returns each section's intersections; the exit calls
`solveReasons()`, `finalizeRegistrations()` and `allocateIds()` itself. Each
read map is cleared by its last reader: expression reads after resolution,
function reads after the solve.

A step added later now lands visibly on one side of the solve; a finalizer
that reads reasons belongs after `solveReasons()`, not among the finalizers
before it. AGENTS.md and RESUMABILITY.md name the phase each fact settles in.
No output change.

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

changeset-bot Bot commented Oct 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ed9495a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.86%. Comparing base (5c9b80a) to head (ed9495a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4524   +/-   ##
=======================================
  Coverage   94.86%   94.86%           
=======================================
  Files         419      419           
  Lines       20910    20911    +1     
  Branches     4176     4176           
=======================================
+ Hits        19836    19837    +1     
  Misses        617      617           
  Partials      457      457           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b388519d-6d9c-48d7-af87-16988aad45f3
Commits

Reviewing files that changed from the base of the PR and between 5c9b80a and ed9495a.

Files selected for processing: 5
  • packages/runtime-tags/AGENTS.md
  • packages/runtime-tags/RESUMABILITY.md
  • packages/runtime-tags/src/translator/util/finalize-references.ts
  • packages/runtime-tags/src/translator/util/solve-reasons.ts
  • packages/runtime-tags/src/translator/visitors/program/index.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The program analyzer now runs reference finalization, reason solving, registration finalization, and ID allocation in separate stages. finalizeReferences returns section intersections, and solveReasons clears the function-read-by-expression map after its solving loop. The documentation now distinguishes when reference facts and reasons become complete.

Priority: Low

Merge Risk: Minimal · up to ed949

The refactor preserves the analyzed finalization pipeline, with no actionable merge-blocking risk identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: making the runtime-tag analysis phases explicit at program exit.
Description check Passed The description accurately explains the refactoring, phase ordering, read-map cleanup, documentation updates, and reported absence of output changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DylanPiercey
DylanPiercey merged commit 041a0bc into main Oct 24, 2026
11 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