feat: stable identity map — ownership sidecar, archify locate, drilldown bundles - #367
Draft
tt-a1i wants to merge 17 commits into
Draft
feat: stable identity map — ownership sidecar, archify locate, drilldown bundles#367tt-a1i wants to merge 17 commits into
tt-a1i wants to merge 17 commits into
Conversation
Add a component ownership sidecar (<stem>.ownership.json, validated by
ownership.schema.json) and a pure-computation `archify locate` command
that classifies every path in a git range as touched / uncovered /
ambiguous / excluded and every component as touched / untouched / stale.
- No LLM, no inference, no map edits; ambiguity is reported, never
resolved by implicit glob precedence. `--lint` turns ambiguity into an
authoring-time failure and reports uncovered as advisory only.
- Receipt (locate-receipt.schema.json) is deterministic: stable code
point sort, no timestamps, no absolute paths, 40-char SHAs, sha256 of
map and sidecar. Two runs are byte-identical.
- Renames via `git diff --name-status -M -z`; both sides recorded and a
moved_between_components fact emitted when owners differ.
- `--facts` attaches import-edge observations; endpoints outside any
component are `componentId: null`, never dropped.
- When the map itself changed in the range, `archify compare` runs as a
child process under <out>/compare/ and is linked from mapDelta; the
locate exit code is independent of the comparison.
- Delta `navigation` field group classifies a changed `drilldown` target
as `navigation-changed` rather than `changed` or `moved`.
- SVG annotation helpers extracted from architecture-delta.mjs into
delta/svg-annotate.mjs and shared with the locate HTML.
Tests: archify/test/{locate,locate-glob,locate-html,locate-bundle,
ownership,architecture-delta,generate-validators}.test.mjs. Full suite
1170 tests / 1133 pass / 0 fail / 37 skipped on Node 26; Node 22 package
gates 18 pass. check:validators clean.
…iewer
Add `archify bundle <dir> [--check]`: one entry diagram plus up to twelve
same-directory children of any diagram type, bound by manifest.json
(bundle.schema.json) using diagram ids and two sha256 digests
(spec_sha256 for the runtime handshake, artifact_sha256 for offline
validation). Depth is fixed at two; each level keeps the 12-node cap.
- Architecture components may declare an optional `drilldown: <child id>`
(schema addition, pending maintainer sign-off). The renderer draws the
mark into the SVG so it survives canonical export.
- Viewer descends in place: parent SVG is hidden, never transformed;
breadcrumb + 96px silhouette; child opens in a same-directory iframe;
Esc/Backspace/breadcrumb ascend and restore scroll. Parent geometry is
unchanged by construction (drilldown-browser.test.mjs verifies pixels).
- Handshake: hello/ack over postMessage with unconditional event.source
check and shape validation; id/sha mismatch, unsafe filename, or a
1200 ms timeout shows an explicit stale card (built with textContent,
strings via i18n) instead of rendering the child.
- validateBundle runs derived-count checks (manifest schema first,
fail-closed), including the shared child-ownership subset rule from
locate/ownership.mjs. Required <entryId>.ownership.json; no directory
order dependence.
- Locate projection pass-through: `locate --bundle` embeds component and
child node states; parent chip "N FILES TOUCHED INSIDE" hidden at zero;
stale gets a distinct non-green treatment.
- Bundle render flags are parsed once at the renderer CLI entry and
passed explicitly; svgRootAttrs no longer reads process.argv.
- Drilldown runtime exposed as pure functions on Archify.drilldown and
unit-tested in node:vm; CI webm-artifact job runs the Chrome test.
Tests: bundle-{schema,manifest,validate,ownership}, drilldown-{mark,
viewer,stale,locate,browser}, svg-root-attrs, cli, i18n. Full suite
1170 / 1133 pass / 0 fail; Chrome tests 12/12; actionlint clean except
pre-existing SC2016 in release.yml.
…eriments - docs/decisions/identity-map-2026-09-09.md: drilldown contract, ownership sidecar spec, locate receipt format, diagnostic codes, "what we do not do", E1/E3 raw numbers, PR #269/#281 gap assessment, schema changes pending sign-off, code-vs-draft divergences, open questions. Every decision cites path:line. - E3 (100-commit replay of a hand-written self-map): 9/100 commits needed a map edit, 0 ambiguous, uncovered returns to 0; sources line anchors decayed 68.7% over the same range. E1: 8/50 fix commits structural (16%), supporting "orientation", not defect-finding, wording. - docs/cases/archify-self/: ten-component self-map, two children (architecture + workflow), sidecars, manifest, receipts for PR #256 and PR #352 (regenerable; only receipts are kept), README with commands. - archify/references/{locate,drilldown-bundles}.md; SKILL.md fast path unchanged. CHANGELOG entry; one-clause ROADMAP note that the diagram diff stance still holds.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
archify/assets/template.html gained the drilldown runtime and locate
projection styles, so every artifact that embeds the template is
rebuilt per CONTRIBUTING:
- archify.zip via scripts/build-zip.sh on Node 22.23.2
(1,959,997 bytes, +82,567 vs origin/main)
- packaged and root examples/*.html goldens, checkout-platform-delta
html + receipt (compare embeds two explorers)
- docs/gallery via scripts/build-gallery.mjs (11 artifacts / 99 checks)
- docs/cases/mco-runtime.architecture.html and
experiments/mco-showcase/mco-runtime.html (byte-repro against mco
@ 9f1a1cf)
- docs/assets/archify-live-proof.{gif,json}: readme-showcase.test.mjs
pins the gallery artifact sha256 into the receipt, forcing the rebuild
No SVG geometry changes in any golden; diffs are viewer chrome only.
tt-a1i
force-pushed
the
feature/identity-map
branch
from
September 8, 2026 20:01
75ba6d4 to
be5fd7c
Compare
CI's headless Chrome caught a refit on ascend: the first implementation hid the entry SVG with display:none, so it left layout, the adaptive reader re-measured the canvas as overflowing on reveal and shrank --archify-reader-width from 1376px to 960px, scaling every node box by 0.691. Reproduced at 1440x900 with the test's 240px canvas pinch. The entry SVG now stays in flow with visibility:hidden while the child is overlaid, and the reader/viewer-chrome measurers are frozen while data-drilldown-level is set, so no fit runs at all. drilldown-browser asserts pixel-identical node boxes at 1440x900 and 800x600 with a child taller than the parent canvas. Decision record §3.7 and the drilldown reference describe the mechanism and why. Goldens, gallery, MCO artifacts and README GIF rebuilt for the template change. npm test: 1170 / 1133 pass / 0 fail / 37 skipped.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and behavior
This draft lets an author attach repository-path ownership to diagram components, classify a Git change range against that map, and navigate from an overview into manifest-bound child diagrams. It reports unclaimed and ambiguous paths explicitly. It does not infer runtime impact, recommend review order, or decide whether a PR should merge.
The recovery candidate is
cc1b33a7a02351347842dad4ebe9c13278afc166, based on main6db72a9. The original mixed checkout and index were preserved; all integration was performed in a separate worktree. This PR remains draft and unmerged.Implementation and compatibility
Broad exclusion presets, a receipt-only output redesign, extra uncovered widgets, an inference engine and automatic PR comments are not included. The reasons and original requirement mapping are in the disposition record.
Validation
generate-viewer --check,actionlintand diff checks pass.0e38aa9: 1,489 total, 1,437 passed, zero failed, 52 skipped; tracked source hashes stayed unchanged. The final delta changes only the Motion Governor browser test and repository acceptance prose. Its focused Chrome 153 / Node 22 run passed 9/9 without skips; all hosted CI gates passed on this head in run 34685055776, including the complete Viewer interaction and bundle/portable-output/export suites. Afterd83f5cestill failed a real file reload, controlled Linux runs reproduced storage loss from a pre-initialization diagnostic read even in equally large script-free HTML. Without that read, generated Viewers and padded controls retained all twenty reloads per condition. The test removes the interfering diagnostic probe; it retains actual storage-value and Governor-mode assertions on five real file reloads and five same-origin HTTP navigations, plus existing reduced-motion/suspension/storage-error coverage. The acceptance record links both controlled runs and preserves earlier failures. No product storage workaround or specific Chromium internal mechanism is claimed.Recovered evidence and limits
The experiment directories are offline research assets, not shipped Skill code. Most added lines in the recovery packages are fixed JSON observations and inert historical scoring inputs:
No new model or simulated human study was performed. The author's Discussions #368 and #369 were corrected to state these evidence and availability boundaries. Separately reproduced main defects are isolated in #396 (renderer diagnostics), #397 (explicit straight routes) and existing #373 (finite SVG attributes); they are not bundled into this feature. Related nested-reading work #280/#281 is not closed or approved by this PR.