Skip to content

refactor(source-map): scope pending construct spans - #89

Merged
luojiyin1987 merged 1 commit into
masterfrom
agent/source-map-pending-construct
Aug 10, 2026
Merged

refactor(source-map): scope pending construct spans#89
luojiyin1987 merged 1 commit into
masterfrom
agent/source-map-pending-construct

Conversation

@luojiyin1987

@luojiyin1987 luojiyin1987 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Move the pending construct span out of RecordingState.
  • Consume each pending span through one guarded function.
  • Reject missing or overlapping pending constructs.
  • Cover consecutive and alternating constructs.

Why

Raw activeStart and activeEnd fields could remain after their event. One typed pending value makes the enter and exit pairing explicit.

Impact

RecordingState now contains only persistent recording maps. Parser output and source-map behavior stay unchanged.

Checks

  • 1,852 source-map tests passed.
  • Full pnpm run prepublishOnly passed.
  • 14 test suites passed.
  • 1,956 tests passed.
  • Build, type tests, ESLint, and package checks passed.

Closes #85
Part of #86

Stack created with GitHub Stacks CLI

@luojiyin1987
luojiyin1987 marked this pull request as ready for review August 10, 2026 02:49
@luojiyin1987
luojiyin1987 force-pushed the agent/source-map-pending-construct branch from d980e51 to 938dd15 Compare August 10, 2026 03:04
Base automatically changed from agent/source-map-node-offsets to master August 10, 2026 03:06
@luojiyin1987
luojiyin1987 force-pushed the agent/source-map-pending-construct branch from 938dd15 to a1989c1 Compare August 10, 2026 03:06
@luojiyin1987
luojiyin1987 merged commit b9b978b into master Aug 10, 2026
13 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.

refactor(source-map): scope pending construct spans

1 participant