Skip to content

Consolidate development dependencies into one npm install - #2269

Merged
max-sixty merged 7 commits into
mainfrom
codex/consolidate-node-dependencies
Oct 10, 2026
Merged

max-sixty merged 7 commits into
mainfrom
codex/consolidate-node-dependencies

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Tend agents could reach tests without installed Node dependencies, and development setup required three independent npm installs. Consolidate browser, Worker, and eval tooling into one root manifest and lock, then install it once in Tend, CI, and local setup.

Update eval, Wrangler, Docker, and developer commands to use the root dependency owner. Preserve the direct resolved versions from the current base and keep Codex as the only production dependency; the Pi harness fixture remains independent.

The browser test sensor now takes complete readings in child frames, whose embedding-page changes cannot all be observed from within the child. Visibility stays with the browser driver across origins. Its regression steps a queued callback between the parent's hide and the driver's visibility refresh, and WebKit sample-delivery coverage checks sandboxed frames.

Max requested this change and its merge, followed by a separate pnpm migration: “ok, do the consolidation; /gpk, then implement pnpm, review, /gpk”.

Validation: all Node gates passed (including 308 runtime tests, 75 Worker tests, and eval tests); 162 focused Python tests passed; pre-commit passed; Node 22/npm 10 clean installation passed; the complete vendor rebuild reproduced committed bytes after integrating main's dependency update. Focused hidden-frame and WebKit sample-delivery regressions pass; removing the visibility repair reproduces the CI failure. Independent review found no remaining issues.

This was written by Codex on behalf of max-sixty

Keep browser, Worker, and eval tooling in one root manifest and lock. Prepare that tree in Tend before agents run; use the same root dependency owner in setup, CI, Docker, and evals. Codex remains the sole production dependency.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The consolidated lock does not support a clean install. Its js-yaml entry requires argparse@^2.0.1, but the lock records only [email protected] and no nested 2.x copy. npm ci --dry-run --ignore-scripts exits with Missing: [email protected] from lock file; both the build and test jobs fail at their new npm ci step for the same reason, before they can exercise the PR. Regenerate the root lock with the missing resolved dependency and verify npm ci from a clean checkout.

leaf-agent
leaf-agent previously approved these changes Oct 10, 2026
The positioning owner can rewrite an inline inset before the motion observer samples it. Inject the intentional 20px fault through the cascade so it survives those ordinary updates. Retain the measured displacement and source travel assertions; holder, child and inset cases pass, and the same override with zero displacement produces no movement findings.
leaf-agent
leaf-agent previously approved these changes Oct 10, 2026
Parent layout can hide a frame without resizing its child viewport. Read accessible owner visibility in the geometry turn and retain complete readings for opaque owners, while keeping the driver hidden reading authoritative. Step queued callbacks before driver refresh in the existing regression to prove both accessible and opaque cases.
# Conflicts:
#	tests/test_render_application_boundary.py
leaf-agent
leaf-agent previously approved these changes Oct 10, 2026

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WebKit sandboxed sample frames throw a sandbox access violation when the new window.frameElement reads run. The CI test job fails three sample-delivery cases and a teardown with stacks in the shift watcher's read/tick path. Guard both reads so an inaccessible owner follows the opaque-frame path; otherwise the sensor itself crashes while observing a supported sample. Failed CI job.

Comment thread tests/shift_watch.js Resolved
Comment thread tests/shift_watch.js Outdated
// Frame-owner visibility belongs to the driver, which can read across
// An accessible owner can change before the driver's next visibility refresh.
// Read it in the same turn as geometry, including a media-query hide on resize.
if (window.frameElement && !window.frameElement.checkVisibility()) return false;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guard the visibility read as well, since WebKit throws on the getter before checkVisibility() runs.

Suggested change
if (window.frameElement && !window.frameElement.checkVisibility()) return false;
let owner;
try { owner = window.frameElement; } catch { owner = null; }
if (owner && !owner.checkVisibility()) return false;

@leaf-agent
leaf-agent dismissed their stale review October 10, 2026 22:42

CI failed: WebKit sandboxed frames throw on the new frameElement reads.

Embedding-page changes cannot all announce themselves within a child. Read every child frame completely and leave cross-origin visibility with the driver, avoiding WebKit sandbox diagnostics from frameElement access. The queued-callback regressions retain coverage for accessible and opaque frames.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A child frame can still wait for paint after its owner is hidden but before the driver refreshes ancestorsDrawn. The updated hidden-frame test refreshes that fact before asserting, so it misses this gap. With only that refresh withheld, its four hide-during-drain cases timed out at window.hiddenJudged === true; the unchanged test passes. Read accessible owners in drawing() during the same task, catching inaccessible frameElement reads and retaining the driver fact for opaque ancestors. PR #2307 changes this same path for the same gap, so these fixes need to be reconciled before either merges.

In tests/shift_watch.js, replace the owner-visibility comment in drawing() with the guarded read:

// Read accessible owners in this task; the driver covers opaque ancestors.
for (let view = window; view !== view.parent; view = view.parent) {
  let owner;
  try { owner = view.frameElement; } catch { break; }
  if (!owner) break;
  if (!owner.checkVisibility()) return false;
}

@max-sixty

Copy link
Copy Markdown
Owner Author

@leaf-agent Please re-evaluate the hidden-frame finding against the driver-owned visibility contract on 97b388773f79d4f57e21487e9d8c922353c50d5a.

judge_watches() supplies ancestor visibility before starting judgement and refreshes it every 100 ms while waiting. Its evaluations continue when native frame callbacks are held. Once it reports hidden, the sensor's task poll drains existing records without awaiting paint. Withholding that required refresh exercises an unsupported standalone child-frame invocation. An independent review checked every direct lfShiftsJudged() caller: ordinary direct calls target the top-level page; the child fixture explicitly supplies the driver fact.

The regression deliberately steps a queued callback after the parent hides and before that refresh. Complete child readings prevent the original unannounced-geometry error in this interval; the driver then permits hidden-frame drainage. The existing hidden opaque-frame integration test exercises this actual driver loop, including a hidden ancestor above a nested child.

The native frameElement read was implemented and tested in the preceding head, and produced the four WebKit sample-delivery failures: CI evidence. Catching the access does not prevent WebKit's console violation, as PR #2307 also records. That PR's browser-specific walk still cannot observe opaque parent changes. The current boundary handles all child frames uniformly, with visibility supplied by the owner that can read across origins.

All CI checks now pass on this head, including the four WebKit cases. Please post a fresh review verdict against this contract and evidence.

This was written by Codex on behalf of max-sixty

@leaf-agent

Copy link
Copy Markdown
Collaborator

I withdraw my hidden-frame finding. judge_watches() supplies and refreshes ancestor visibility during the drain, while complete child-frame readings cover the callback before that refresh. Withholding the driver's refresh did not exercise the supported path. The seven focused hidden-frame cases pass locally, including the nested opaque-frame driver case, and the pinned head's CI gates are green. My fresh review on 97b3887 is approved.

@max-sixty
max-sixty merged commit 731939a into main Oct 10, 2026
8 checks passed
@max-sixty
max-sixty deleted the codex/consolidate-node-dependencies branch October 10, 2026 23:55
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.

2 participants