Skip to content

review: resolve package-relative material locators when matching diff paths#212

Merged
nahiyankhan merged 3 commits into
adapting-a-starterfrom
review-locator-matching
Jul 9, 2026
Merged

review: resolve package-relative material locators when matching diff paths#212
nahiyankhan merged 3 commits into
adapting-a-starterfrom
review-locator-matching

Conversation

@nahiyankhan

Copy link
Copy Markdown
Collaborator

Category: fix
User Impact: ghost review now correctly offers a fingerprint's value checks when the package lives below the repo root — previously they were silently dropped from the review packet.
Problem: Found during #208's ref-regeneration acceptance test: checks/values.md was never offered even though files listed in its referenced nodes' materials were in the diff. Root cause: resolveReview matched raw locator text against diff paths. Git emits diff paths repo-relative (packages/vessel-light/.ghost/materials/tokens.css), but exact-path locators are package-relative (materials/tokens.css) — so every exact-path locator silently missed whenever the package sat below the repo root. Glob locators like **/*.css masked the bug by matching anything, which is why grammar-referencing checks were still offered and the drop went unnoticed.
Solution: Match locators through materialLocatorClaimsPath — the same ghost-core resolution ghost validate already uses — which expands package-relative locators to their repo-relative form before matching. buildReviewPacket gains a packageDir option; the review command threads the resolved package dir through.

Stacked on #211 (base: adapting-a-starter) — the review machinery this fixes only exists in the stack. Full merge order: #207#208#209#210#211 ← this.

Validation:

  • New regression test: package at nested/app/.ghost with an exact-path materials/tokens.css locator + a check referencing the node → check offered as matched. Verified the test fails without the fix (stash/rebuild/run: 1 failed) and passes with it.
  • Re-ran the original vessel-light: fork-axis re-authoring — grammar/signature/register + median floor #208 symptom live: a diff touching vessel-light's tokens.css + a ref now matches all 13 material-backed nodes and offers all 5 checks including values (previously 4, values missing).
  • pnpm check + pnpm test (133 passed, 1 skipped) via pre-commit.

Changeset: added (patch) — user-facing fix to ghost review behavior.

Ghost Review: N/A — this fixes the review command itself; validated by its own packet output above.

File changes

packages/ghost/src/review/resolve.ts
resolveReview gains a MaterialTransportOptions parameter; locator matching switches from raw-text matchesGlob to materialLocatorClaimsPath (package-relative expansion, same semantics as validate). Comment documents the failure shape.

packages/ghost/src/review/review-packet.ts
BuildReviewPacketOptions.packageDir; builds transport options (git root + package dir + materials dir) and passes them through.

packages/ghost/src/commands/review-command.ts
Threads paths.packageDir into the packet builder.

packages/ghost/test/cli.test.ts
Regression test: nested package, exact-path locator, check offered as matched.

.changeset/review-locator-matching.md
patch.

Screenshots/Demos: N/A — CLI fix; the JSON packet diff above is the evidence.

…contract (#213)

* corpus: audit backports, check cross-wiring, terminology sweeps

* median: one authored home — headings contract, payload check, all templates stamp the floor

* vessel-light: re-derive median onto the headings contract; docs get the ownership reframe
@nahiyankhan nahiyankhan marked this pull request as ready for review July 9, 2026 14:14
@nahiyankhan nahiyankhan merged commit cc74668 into adapting-a-starter Jul 9, 2026
1 check passed
@nahiyankhan nahiyankhan deleted the review-locator-matching branch July 9, 2026 14:14
nahiyankhan added a commit that referenced this pull request Jul 9, 2026
…211)

* skill: adapting-a-starter recipe — the seven-step transplant procedure

* review: resolve package-relative material locators when matching diff paths (#212)

* review: resolve package-relative material locators when matching diff paths

* demo: drop stale parked-branch reference from eval artifacts gitignore

* median: one authored home — model truth stamped at init, prunable by contract (#213)

* corpus: audit backports, check cross-wiring, terminology sweeps

* median: one authored home — headings contract, payload check, all templates stamp the floor

* vessel-light: re-derive median onto the headings contract; docs get the ownership reframe
nahiyankhan added a commit that referenced this pull request Jul 9, 2026
* init: packed-payload mechanism — dist payloads, byte-capable template seam

* template: skeleton rides packed files

* init: --body vessel-light — install the full inhabited package

* checks: packed-artifact body probes — fonts and checks survive pack

* docs: body install in getting-started + cli-reference; minor changeset

* skill: adapting-a-starter — the seven-step starter transplant recipe (#211)

* skill: adapting-a-starter recipe — the seven-step transplant procedure

* review: resolve package-relative material locators when matching diff paths (#212)

* review: resolve package-relative material locators when matching diff paths

* demo: drop stale parked-branch reference from eval artifacts gitignore

* median: one authored home — model truth stamped at init, prunable by contract (#213)

* corpus: audit backports, check cross-wiring, terminology sweeps

* median: one authored home — headings contract, payload check, all templates stamp the floor

* vessel-light: re-derive median onto the headings contract; docs get the ownership reframe
nahiyankhan added a commit that referenced this pull request Jul 9, 2026
…n floor (#209)

* template: naked skeleton replaces steering default

* checks: median-tells scaffold — live check pairing with anti-goal.median, deterministic floor, model tells

* skill: migrate Morrow teaching shapes to authoring-scenarios

* docs: skeleton starter in getting-started + cli-reference; minor changeset

* ghost init --body: packed payloads + vessel-light body install (#210)

* init: packed-payload mechanism — dist payloads, byte-capable template seam

* template: skeleton rides packed files

* init: --body vessel-light — install the full inhabited package

* checks: packed-artifact body probes — fonts and checks survive pack

* docs: body install in getting-started + cli-reference; minor changeset

* skill: adapting-a-starter — the seven-step starter transplant recipe (#211)

* skill: adapting-a-starter recipe — the seven-step transplant procedure

* review: resolve package-relative material locators when matching diff paths (#212)

* review: resolve package-relative material locators when matching diff paths

* demo: drop stale parked-branch reference from eval artifacts gitignore

* median: one authored home — model truth stamped at init, prunable by contract (#213)

* corpus: audit backports, check cross-wiring, terminology sweeps

* median: one authored home — headings contract, payload check, all templates stamp the floor

* vessel-light: re-derive median onto the headings contract; docs get the ownership reframe
nahiyankhan added a commit that referenced this pull request Jul 9, 2026
…edian floor (#208)

* materials: tokens audit — radius roles, hoist grammar-enumerated values

* corpus: fork-axis re-author — grammar/signature/register/anti-goal

* checks: relationship/value split — density.md retired, median-tells gains demoted rules, frequency thresholds, model-named tells

* materials: regenerate refs — annotated, closed-set complete

* docs: vessel-light README — fork-axis structure and ref-annotation curation

* ghost init: naked skeleton default — grammar, unanswered dials, median floor (#209)

* template: naked skeleton replaces steering default

* checks: median-tells scaffold — live check pairing with anti-goal.median, deterministic floor, model tells

* skill: migrate Morrow teaching shapes to authoring-scenarios

* docs: skeleton starter in getting-started + cli-reference; minor changeset

* ghost init --body: packed payloads + vessel-light body install (#210)

* init: packed-payload mechanism — dist payloads, byte-capable template seam

* template: skeleton rides packed files

* init: --body vessel-light — install the full inhabited package

* checks: packed-artifact body probes — fonts and checks survive pack

* docs: body install in getting-started + cli-reference; minor changeset

* skill: adapting-a-starter — the seven-step starter transplant recipe (#211)

* skill: adapting-a-starter recipe — the seven-step transplant procedure

* review: resolve package-relative material locators when matching diff paths (#212)

* review: resolve package-relative material locators when matching diff paths

* demo: drop stale parked-branch reference from eval artifacts gitignore

* median: one authored home — model truth stamped at init, prunable by contract (#213)

* corpus: audit backports, check cross-wiring, terminology sweeps

* median: one authored home — headings contract, payload check, all templates stamp the floor

* vessel-light: re-derive median onto the headings contract; docs get the ownership reframe
nahiyankhan added a commit that referenced this pull request Jul 9, 2026
…ng-eval harness (#207)

* Add vendored vessel-react fingerprint: taste-floor nodes, materials wired to component sets, baseline hygiene checks

* Rename packages/vessel to packages/vessel-react; workspace fingerprint id follows

* Add vessel-light: Vessel's design language as a portable .ghost fingerprint for raw HTML/CSS agents

* Add steering-eval: portable before/after evaluation harness for Ghost fingerprints; wire vessel-light demo as first consumer

* Fix pilot findings: agent-browser set-viewport invocation, skip empty cells, brandTokens/pulledWords from tape

* Run the full steering-eval matrix on vessel-light: 45 generations + dump-growth, screenshots, metrics, report

* Park eval run artifacts on vessel-eval-artifacts branch; ignore demo/out on mainline

* steering-eval: emit WebP screenshots (shoot to PNG, convert via cwebp, embed webp in report)

* vessel-light: fork-axis re-authoring — grammar/signature/register + median floor (#208)

* materials: tokens audit — radius roles, hoist grammar-enumerated values

* corpus: fork-axis re-author — grammar/signature/register/anti-goal

* checks: relationship/value split — density.md retired, median-tells gains demoted rules, frequency thresholds, model-named tells

* materials: regenerate refs — annotated, closed-set complete

* docs: vessel-light README — fork-axis structure and ref-annotation curation

* ghost init: naked skeleton default — grammar, unanswered dials, median floor (#209)

* template: naked skeleton replaces steering default

* checks: median-tells scaffold — live check pairing with anti-goal.median, deterministic floor, model tells

* skill: migrate Morrow teaching shapes to authoring-scenarios

* docs: skeleton starter in getting-started + cli-reference; minor changeset

* ghost init --body: packed payloads + vessel-light body install (#210)

* init: packed-payload mechanism — dist payloads, byte-capable template seam

* template: skeleton rides packed files

* init: --body vessel-light — install the full inhabited package

* checks: packed-artifact body probes — fonts and checks survive pack

* docs: body install in getting-started + cli-reference; minor changeset

* skill: adapting-a-starter — the seven-step starter transplant recipe (#211)

* skill: adapting-a-starter recipe — the seven-step transplant procedure

* review: resolve package-relative material locators when matching diff paths (#212)

* review: resolve package-relative material locators when matching diff paths

* demo: drop stale parked-branch reference from eval artifacts gitignore

* median: one authored home — model truth stamped at init, prunable by contract (#213)

* corpus: audit backports, check cross-wiring, terminology sweeps

* median: one authored home — headings contract, payload check, all templates stamp the floor

* vessel-light: re-derive median onto the headings contract; docs get the ownership reframe

* build: root build and packed-package check produce the full ghost artifact

Root pnpm build only ran tsc, so dist/init-payloads and dist/skill-bundle
were missing in CI: the vessel-light body test failed and check-packed-package
packed a tarball without payloads. Root build now chains the package-level
build; check:packed-package builds its own complete artifact since the lint
job never runs pnpm build.

Signed-off-by: Nahiyan Khan <nahiyan@squareup.com>

---------

Signed-off-by: Nahiyan Khan <nahiyan@squareup.com>
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