From 935f8df75229b0edaab48e6c27a888db52478f80 Mon Sep 17 00:00:00 2001
From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com>
Date: Sat, 3 Oct 2026 09:09:27 -0700
Subject: [PATCH 1/3] Close post-merge dependency viewer review findings
Preserve component-role provenance, limit paths to required dependencies, link validated exact sources, and retain native fragment focus during delayed rendering. Add model and hosted-browser regressions.
OpenAI Codex delegated UI integration. Scientific effect: NONE.
---
docs/site/dependencies.html | 2 +-
docs/site/dependencies.mjs | 15 +++++++--
docs/site/dependency-model.mjs | 25 ++++++++++++++-
tests/test_dependency_viewer.mjs | 37 +++++++++++++++++++---
tests/test_public_shop_browser_contract.py | 4 +++
tools/public_shop_browser_check.py | 12 +++++++
6 files changed, 85 insertions(+), 10 deletions(-)
diff --git a/docs/site/dependencies.html b/docs/site/dependencies.html
index 86fd70e9e..070c88882 100644
--- a/docs/site/dependencies.html
+++ b/docs/site/dependencies.html
@@ -67,7 +67,7 @@
Claim dependency viewer
Consumes
Edges point from a dependent claim to the source it consumes.
Consumed by
Direct dependents recorded in this source snapshot.
- Paths to unresolved dependencies
Shortest source-edge paths found below the selected node. A missing path is not evidence that no dependency exists outside this snapshot.
+ Paths to unresolved dependencies
Shortest required source-edge paths found below the selected node. Contextual edges remain visible in the direct-dependency list but are not counted as consumed dependency paths. A missing path is not evidence that no dependency exists outside this snapshot.
diff --git a/docs/site/dependencies.mjs b/docs/site/dependencies.mjs
index 433a8de5b..f1c630340 100644
--- a/docs/site/dependencies.mjs
+++ b/docs/site/dependencies.mjs
@@ -26,6 +26,7 @@ function prepareInitialSelectionRestore({ windowObject = window, documentObject
const cleanup = () => events.forEach(event => windowObject.removeEventListener(event, cancel, options));
const cancel = event => {
if (event.type === 'pointermove' && !event.buttons) return;
+ if (event.type === 'focusin' && event.target === documentObject.getElementById('node-detail')) return;
cancelled = true;
cleanup();
};
@@ -85,9 +86,17 @@ function emptyItem(message) {
function metadata(node) {
const fragment = document.createDocumentFragment();
- for (const [label, value] of metadataEntries(node)) {
+ for (const [label, value, href] of metadataEntries(node)) {
const wrapper = element('div');
- wrapper.append(element('dt', { text: label }), element('dd', { text: value }));
+ const description = element('dd');
+ if (href) {
+ const link = element('a', { text: value });
+ link.href = href;
+ description.append(link);
+ } else {
+ description.textContent = value;
+ }
+ wrapper.append(element('dt', { text: label }), description);
fragment.append(wrapper);
}
return fragment;
@@ -184,7 +193,7 @@ function run({ index, provenance }) {
));
const paths = dependencyPaths(index, selected.id);
byId('dependency-paths').replaceChildren(...(
- paths.length ? paths.map(renderPath) : [emptyItem('No path to another unresolved target is recorded below this node.')]
+ paths.length ? paths.map(renderPath) : [emptyItem('No required path to another unresolved target is recorded below this node.')]
));
if (writeURL) updateURL(selected.id);
if (focus) byId('node-detail').focus({ preventScroll: true });
diff --git a/docs/site/dependency-model.mjs b/docs/site/dependency-model.mjs
index 129cff754..993e8f90c 100644
--- a/docs/site/dependency-model.mjs
+++ b/docs/site/dependency-model.mjs
@@ -64,6 +64,26 @@ function displayValue(value) {
return String(value);
}
+function metadataHref(field, value) {
+ if (!['source', 'review_source', 'review_url'].includes(field) || typeof value !== 'string')
+ return undefined;
+ try {
+ const url = new URL(value);
+ if (url.protocol === 'https:' && url.hostname === 'github.com' &&
+ !url.username && !url.password && !url.port)
+ return value;
+ return undefined;
+ } catch {
+ const segments = value.split('/');
+ if (!value || value.startsWith('/') || value.includes('\\') ||
+ segments.some(segment => !segment || segment === '.' || segment === '..') ||
+ !segments.every(segment => /^[A-Za-z0-9._-]+$/.test(segment)))
+ return undefined;
+ const path = segments.map(encodeURIComponent).join('/');
+ return `https://github.com/${PINNED_GRAPH_SOURCE.repository}/blob/${PINNED_GRAPH_SOURCE.commit}/${path}`;
+ }
+}
+
export function metadataEntries(node) {
const values = [
['Identifier', node.id],
@@ -78,6 +98,7 @@ export function metadataEntries(node) {
['fingerprint', 'Fingerprint'],
['scope', 'Scope'],
['notes', 'Notes'],
+ ['component_role', 'Component role'],
['author_provider', 'Author provider'],
['review_provider', 'Review provider'],
['review_providers', 'Review providers'],
@@ -90,7 +111,7 @@ export function metadataEntries(node) {
];
for (const [field, label] of fields) {
if (node[field] !== undefined && displayValue(node[field]).length)
- values.push([label, displayValue(node[field])]);
+ values.push([label, displayValue(node[field]), metadataHref(field, node[field])]);
}
return values;
}
@@ -189,6 +210,7 @@ export function buildGraphIndex(graph) {
node.source,
node.notes,
node.scope,
+ node.component_role,
node.author_provider,
node.review_provider,
node.review_providers,
@@ -244,6 +266,7 @@ export function dependencyPaths(index, startId) {
recordedTargets.add(currentId);
}
for (const edge of current.dependencies) {
+ if (!edge.required) continue;
if (path.ids.includes(edge.id)) continue;
const nextDepth = path.ids.length;
if (shortestDepth.has(edge.id) && shortestDepth.get(edge.id) <= nextDepth) continue;
diff --git a/tests/test_dependency_viewer.mjs b/tests/test_dependency_viewer.mjs
index 44e27a289..2dcb42bd9 100644
--- a/tests/test_dependency_viewer.mjs
+++ b/tests/test_dependency_viewer.mjs
@@ -111,6 +111,27 @@ test('classification styling and metadata preserve source review lineage', async
);
assert.ok(searchNodes(index, 'never discharge')
.some(node => node.id === 'math.d1-component.reconciliation-record'));
+ const component = index.nodes.get('math.d5-component.punctured-pin-continuum-check');
+ const componentEntries = new Map(metadataEntries(component));
+ assert.equal(componentEntries.get('Component role'), 'review_checker');
+ assert.ok(searchNodes(index, 'review_checker')
+ .some(node => node.id === component.id));
+
+ const remainderEntries = metadataEntries(index.nodes.get('math.lifetime-remainder'));
+ const source = remainderEntries.find(([label]) => label === 'Source');
+ const reviewSource = remainderEntries.find(([label]) => label === 'Review source');
+ assert.equal(source[2],
+ 'https://github.com/d6g8k5htny-coder/Math-/blob/7858329974e28be79f29b22644370084ff43da4f/frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md');
+ assert.equal(reviewSource[2],
+ 'https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-5841782206');
+ const externalSource = metadataEntries(index.nodes.get('math.rn-mesoscopic-reduction'))
+ .find(([label]) => label === 'Source');
+ assert.equal(externalSource[2], undefined);
+ assert.equal(metadataEntries({
+ id: 'synthetic', classification: 'OPEN_ACTIVE', layer: 'test', kind: 'candidate',
+ controlling: false, impact: 0, source: '../private.txt',
+ review_source: 'https://example.com/review',
+ }).filter(([, , href]) => href !== undefined).length, 0);
});
test('classification CSS identifiers use locale-neutral ASCII case folding', () => {
@@ -124,17 +145,22 @@ test('classification CSS identifiers use locale-neutral ASCII case folding', ()
}
});
-test('dependency paths are source-edge paths and retain relation metadata', async () => {
+test('dependency paths use required source edges and retain relation metadata', async () => {
const index = buildGraphIndex(await fixture());
const paths = dependencyPaths(index, 'math.rn-mesoscopic-reduction');
const target = paths.find(path => path.ids.at(-1) === 'hist.Piece-2-annulus');
- assert.ok(target);
- assert.equal(target.ids[0], 'math.rn-mesoscopic-reduction');
- assert.equal(target.edges.length, target.ids.length - 1);
- assert.ok(target.edges.every(edge => typeof edge.relation === 'string' && edge.relation.length));
+ assert.equal(target, undefined);
const nested = paths.find(path => path.ids.at(-1) === 'math.rn-count-interface');
assert.ok(nested);
assert.ok(nested.ids.includes('math.rn-fixed-remote-window'));
+ assert.equal(nested.ids[0], 'math.rn-mesoscopic-reduction');
+ assert.equal(nested.edges.length, nested.ids.length - 1);
+ assert.ok(nested.edges.every(edge => edge.required && edge.relation.length));
+
+ const annulusPaths = dependencyPaths(index, 'math.rn-fixed-annulus-window');
+ assert.deepEqual(annulusPaths.map(path => path.ids.at(-1)), ['math.rn-count-interface']);
+ assert.ok(!annulusPaths.some(path => path.ids.includes('regional.fixed-annulus.high-jet-route')));
+ assert.ok(!annulusPaths.some(path => path.ids.includes('hist.CH-LIFT')));
});
test('saved node links fail visibly instead of selecting an unrelated node', async () => {
@@ -185,6 +211,7 @@ test('the viewer page exposes its source boundary and accessible interaction con
assert.match(app, /popstate[\s\S]*writeURL:\s*false,\s*focus:\s*false/);
assert.match(app, /prepareInitialSelectionRestore/);
assert.match(app, /\['wheel',[\s\S]*'pagehide'\]/);
+ assert.match(app, /event\.type === 'focusin'[\s\S]*node-detail/);
assert.match(app, /requestAnimationFrame/);
assert.match(app, /scrollIntoView\(\{\s*block:\s*'start',\s*behavior:\s*'instant'\s*\}\)/);
assert.match(app, /dependencyPaths/);
diff --git a/tests/test_public_shop_browser_contract.py b/tests/test_public_shop_browser_contract.py
index 234ef4571..cb4bb8007 100644
--- a/tests/test_public_shop_browser_contract.py
+++ b/tests/test_public_shop_browser_contract.py
@@ -61,6 +61,10 @@ def test_reader_tools_have_desktop_and_mobile_browser_evidence(self):
'Pinned Math commit 7858329974e2', 'math.rn-fixed-annulus-window',
'Saved selection unavailable', 'to_be_focused', 'post-layout saved-link focus',
'https://github.com/d6g8k5htny-coder/main/blob/e60629edde151c27541847b61672e38965752b77/docs/research-translation/20260930/EXPERIMENT.md#1-freeze-the-observable-before-generating-data',
+ 'https://github.com/d6g8k5htny-coder/Math-/blob/7858329974e28be79f29b22644370084ff43da4f/frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md',
+ 'https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-5841782206',
+ '#dependency-paths > li',
+ 'required dependency path and actionable source/review metadata',
'dated claim-dependency snapshot', 'page.keyboard.press("Tab")',
'page.keyboard.press("Enter")',
'documentElement.scrollWidth',
diff --git a/tools/public_shop_browser_check.py b/tools/public_shop_browser_check.py
index 0dd63df05..ba3a887ce 100644
--- a/tools/public_shop_browser_check.py
+++ b/tools/public_shop_browser_check.py
@@ -263,6 +263,18 @@ def check_reader_tools_flow(page, origin, expect, result, output):
expect(page.locator("#node-detail")).to_be_focused()
expect(page.locator("#node-metadata")).to_contain_text("Review source")
expect(page.locator("#node-metadata")).to_contain_text("reviews/pr22_fixed_annulus_nonauthor_20260925/REVIEW.md")
+ expect(page.locator("#dependency-paths > li")).to_have_count(1)
+ expect(page.locator("#dependency-paths > li")).to_contain_text("math.rn-count-interface")
+ expect(page.locator("#dependency-paths")).not_to_contain_text("hist.CH-LIFT")
+ page.locator("#dependency-search").fill("math.lifetime-remainder")
+ expect(page.locator("#search-results > li")).to_have_count(1)
+ page.locator("#search-results button").click()
+ expected_remainder_source="https://github.com/d6g8k5htny-coder/Math-/blob/7858329974e28be79f29b22644370084ff43da4f/frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md"
+ expected_remainder_review="https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-5841782206"
+ expect(page.locator(f'#node-metadata a[href="{expected_remainder_source}"]')).to_have_count(1)
+ expect(page.locator(f'#node-metadata a[href="{expected_remainder_review}"]')).to_have_count(1)
+ result["steps"].append("required dependency path and actionable source/review metadata checked")
+ page.goto(origin+"dependencies.html?node=math.rn-fixed-annulus-window#node-detail")
require(parse_qs(urlsplit(page.url).query)=={"node":["math.rn-fixed-annulus-window"]},"Saved dependency selection missing")
page.reload()
expect(page.locator("#detail-heading")).to_have_text("math.rn-fixed-annulus-window",timeout=45000)
From d4d6c574afb9c4fd6a82d62b75272aa8265f6af6 Mon Sep 17 00:00:00 2001
From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com>
Date: Sat, 3 Oct 2026 09:11:43 -0700
Subject: [PATCH 2/3] Select the exact lifetime node in browser QA
The exact search has two legitimate matches; bind the hosted check to the exact node button instead of asserting a global result count.
Scientific effect: NONE.
---
tools/public_shop_browser_check.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/public_shop_browser_check.py b/tools/public_shop_browser_check.py
index ba3a887ce..a17ef9f91 100644
--- a/tools/public_shop_browser_check.py
+++ b/tools/public_shop_browser_check.py
@@ -267,8 +267,9 @@ def check_reader_tools_flow(page, origin, expect, result, output):
expect(page.locator("#dependency-paths > li")).to_contain_text("math.rn-count-interface")
expect(page.locator("#dependency-paths")).not_to_contain_text("hist.CH-LIFT")
page.locator("#dependency-search").fill("math.lifetime-remainder")
- expect(page.locator("#search-results > li")).to_have_count(1)
- page.locator("#search-results button").click()
+ remainder_result=page.get_by_role("button",name="math.lifetime-remainder",exact=True)
+ expect(remainder_result).to_have_count(1)
+ remainder_result.click()
expected_remainder_source="https://github.com/d6g8k5htny-coder/Math-/blob/7858329974e28be79f29b22644370084ff43da4f/frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md"
expected_remainder_review="https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-5841782206"
expect(page.locator(f'#node-metadata a[href="{expected_remainder_source}"]')).to_have_count(1)
From 255110b6cca55042569b728b12d9a556c1af20db Mon Sep 17 00:00:00 2001
From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com>
Date: Sat, 3 Oct 2026 09:18:38 -0700
Subject: [PATCH 3/3] Test exact dependency result identifier
---
tests/test_public_shop_browser_contract.py | 1 +
tools/public_shop_browser_check.py | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/test_public_shop_browser_contract.py b/tests/test_public_shop_browser_contract.py
index cb4bb8007..1a2b3266e 100644
--- a/tests/test_public_shop_browser_contract.py
+++ b/tests/test_public_shop_browser_contract.py
@@ -64,6 +64,7 @@ def test_reader_tools_have_desktop_and_mobile_browser_evidence(self):
'https://github.com/d6g8k5htny-coder/Math-/blob/7858329974e28be79f29b22644370084ff43da4f/frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md',
'https://github.com/d6g8k5htny-coder/main/issues/67#issuecomment-5841782206',
'#dependency-paths > li',
+ 'strong:text-is("math.lifetime-remainder")',
'required dependency path and actionable source/review metadata',
'dated claim-dependency snapshot', 'page.keyboard.press("Tab")',
'page.keyboard.press("Enter")',
diff --git a/tools/public_shop_browser_check.py b/tools/public_shop_browser_check.py
index a17ef9f91..821573ddb 100644
--- a/tools/public_shop_browser_check.py
+++ b/tools/public_shop_browser_check.py
@@ -267,7 +267,9 @@ def check_reader_tools_flow(page, origin, expect, result, output):
expect(page.locator("#dependency-paths > li")).to_contain_text("math.rn-count-interface")
expect(page.locator("#dependency-paths")).not_to_contain_text("hist.CH-LIFT")
page.locator("#dependency-search").fill("math.lifetime-remainder")
- remainder_result=page.get_by_role("button",name="math.lifetime-remainder",exact=True)
+ remainder_result=page.locator(
+ '#search-results button:has(strong:text-is("math.lifetime-remainder"))'
+ )
expect(remainder_result).to_have_count(1)
remainder_result.click()
expected_remainder_source="https://github.com/d6g8k5htny-coder/Math-/blob/7858329974e28be79f29b22644370084ff43da4f/frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md"