Skip to content

Expose diagnostics materialization scope helpers - #727

Merged
flyingrobots merged 1 commit into
mainfrom
v19-diagnostics-subpath-follow-through
Jul 5, 2026
Merged

Expose diagnostics materialization scope helpers#727
flyingrobots merged 1 commit into
mainfrom
v19-diagnostics-subpath-follow-through

Conversation

@flyingrobots

Copy link
Copy Markdown
Member

Summary

  • Expose visible-state scope helpers from @git-stunts/git-warp/diagnostics so materialized-state inspection has a non-legacy import path.
  • Add a diagnostics export regression test for normalizeVisibleStateScope, nodeIdInVisibleStateScope, and scopeMaterializedState.
  • Record the public subpath follow-through in CHANGELOG.md.

Fixes #720

Validation

  • npx vitest run test/unit/domain/diagnostics.exports.test.ts
  • npx vitest run test/unit/scripts/v18-package-surface-audit.test.ts test/unit/scripts/materialize-api-classification.test.ts
  • npm run lint:source-backed-reference
  • npm run typecheck:src
  • npm run typecheck:test
  • npm run typecheck:surface
  • npm run lint -- --quiet
  • npm run lint:docs-topology
  • npm run test:local
  • pre-push IRONCLAD M9 gates passed

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 47a7d85d-074c-43fd-b16f-1d36298f710d

📥 Commits

Reviewing files that changed from the base of the PR and between eefb956 and 03d0c65.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • diagnostics.ts
  • test/unit/domain/diagnostics.exports.test.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: coverage-threshold
  • GitHub Check: preflight
  • GitHub Check: test-node (22)
  • GitHub Check: type-firewall-lint
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Do not use direct imports from src/infrastructure/** in src/domain/** or src/ports/**; depend on a port instead.
Do not use direct Node built-ins in src/domain/** or src/ports/**; use a port instead.

Files:

  • diagnostics.ts
  • test/unit/domain/diagnostics.exports.test.ts
🧠 Learnings (1)
📚 Learning: 2026-03-08T19:50:17.519Z
Learnt from: flyingrobots
Repo: git-stunts/git-warp PR: 65
File: CHANGELOG.md:88-88
Timestamp: 2026-03-08T19:50:17.519Z
Learning: Follow the Keep a Changelog convention for CHANGELOG.md. Allow duplicate subheadings across versions (e.g., '### Added', '### Fixed'). Configure markdownlint MD024 with {"siblings_only": true} to avoid cross-version false positives.

Applied to files:

  • CHANGELOG.md
🔇 Additional comments (3)
test/unit/domain/diagnostics.exports.test.ts (1)

30-50: LGTM!

CHANGELOG.md (1)

17-18: LGTM!

diagnostics.ts (1)

39-47: 🗄️ Data Integrity & Integration

No browser diagnostics parity issue. @git-stunts/git-warp/browser intentionally omits diagnostics, and ./diagnostics already exposes the matching value/type surface here.

			> Likely an incorrect or invalid review comment.

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added visible-state scope helpers through the diagnostics subpath for materialized-state inspection.
    • Introduced a non-legacy import path for these diagnostics utilities.
    • Exported additional visible-state scope types for better type support.
  • Documentation

    • Updated the changelog to note the new diagnostics-scoping availability.

Walkthrough

The diagnostics subpath now re-exports VisibleStateScope helper functions and types (normalizeVisibleStateScope, nodeIdInVisibleStateScope, scopeMaterializedState, VisibleStateScope, VisibleStateScopePrefixFilter) from the domain services module. A new test file validates these exports, and the changelog documents the addition.

Changes

Diagnostics visible-state scope exports

Layer / File(s) Summary
Add and re-export VisibleStateScope helpers
diagnostics.ts
Adds named value exports (normalizeVisibleStateScope, nodeIdInVisibleStateScope, scopeMaterializedState) and type exports (VisibleStateScope, VisibleStateScopePrefixFilter) from the VisibleStateScope service module.
Validate exports with new tests
test/unit/domain/diagnostics.exports.test.ts
Adds a test suite with an emptyWarpState() helper, verifying scope normalization, prefix-based node ID classification, and scopeMaterializedState's null-passthrough behavior.
Document change
CHANGELOG.md
Adds an Unreleased/Changed entry describing the new diagnostics subpath export for visible-state scope helpers.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

A hop, a skip, a scoped-out state,
New paths through diagnostics, clean and straight.
No more legacy maze to chew—
Just prefixes filtered, tried and true.
🐇✨ Ship it, and munch a carrot too!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title concisely matches the main change: exposing diagnostics scope helpers.
Description check ✅ Passed The description includes Summary, Issue, and Test plan, and the missing ADR checklist is non-critical for this mostly complete template.
Linked Issues check ✅ Passed The changes align with #720 by exposing materialization inspection helpers through the diagnostics subpath and adding coverage for the new exports.
Out of Scope Changes check ✅ Passed All changes relate to the diagnostics subpath exposure, regression test, and changelog note; no unrelated edits are evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 18.2.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If this PR is from a release/* branch and merges to main, Main Push Release Branch Check will run final preflight and create v18.2.1. A maintainer who is a JSR @git-stunts scope member must then dispatch the Release workflow manually.

@flyingrobots

Copy link
Copy Markdown
Member Author

Code Lawyer Activity Summary

Area Severity Evidence Outcome
Review threads None Thread-aware GraphQL read returned reviewThreads: []; CodeRabbit approved. No action required.
CI None gh pr checks 727 reports all checks passing, including CodeRabbit, type firewall, platform tests, coverage, links, and release preflight. Green.
Self-audit None Reviewed git diff origin/main...HEAD: diagnostics.ts, test/unit/domain/diagnostics.exports.test.ts, CHANGELOG.md. No defects found.
Public API boundary None @git-stunts/git-warp/diagnostics now exports visible-state scope helpers without changing root/browser exports. Matches #720 scope.
Local tree None git status --porcelain clean. Clean.

No RED/GREEN repair loop was needed because there were no actionable PR or self-discovered issues.

@flyingrobots
flyingrobots merged commit 7e68bdf into main Jul 5, 2026
17 checks passed
@flyingrobots
flyingrobots deleted the v19-diagnostics-subpath-follow-through branch July 5, 2026 12:16
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.

v19: move storage and substrate compatibility to explicit subpaths

1 participant