Skip to content

[codex] Extract DNA runtime wiring#1046

Merged
elkimek merged 2 commits into
mainfrom
codex/extract-dna-runtime-wiring
Jul 5, 2026
Merged

[codex] Extract DNA runtime wiring#1046
elkimek merged 2 commits into
mainfrom
codex/extract-dna-runtime-wiring

Conversation

@elkimek

@elkimek elkimek commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a DNA runtime adapter for shell/global integration points: SNP cache publication, debug logging, navigation, sidebar refresh, import-running guard, file-picker bridge, pending import state, delete confirmation, and legacy window binding publication.
  • Remove direct browser-global access from js/dna.js while preserving the legacy exported browser surface.
  • Lower the quality guardrail window-reference baseline from 613 to 589 and include dna-runtime in service worker/typecheck coverage.

Validation

  • ./run-tests.sh
  • npm run quality
  • npm test
  • npm run typecheck
  • npm run typecheck:checkjs
  • npx playwright test tests/playwright/dna-browser-coverage.spec.js --workers=1

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
get-based Error Error Jul 5, 2026 11:38am

@greptile-apps

greptile-apps Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR moves DNA browser wiring into a runtime adapter. The main changes are:

  • New js/dna-runtime.js adapter for shell hooks and legacy globals.
  • js/dna.js now delegates global access through the adapter.
  • Delete and import guard paths now report failure states through adapter contracts.
  • The new module is included in service-worker and typecheck coverage.
  • Runtime-focused tests were added for the extracted behavior.

Confidence Score: 5/5

This looks safe to merge.

No blocking issues found in the changed code.

T-Rex T-Rex Logs

What T-Rex did

  • Compared the initial DNA Runtime wiring baseline by examining the before snapshot.
  • Checked the after DNA Runtime wiring snapshot and confirmed the head revision wiring, 21/21 passing in DNA Runtime Adapters, and exit code 0.
  • Inspected the pre-change quality guardrail output and verified 613/613 window global references, passing typechecks, absence of dna-runtime.js, and no coverage entries.
  • Verified the post-change quality guardrail output, including 589/589 references, exit code 0 for guardrail checks, and the inclusion of dna-runtime.js in service-worker.js and related config/tests files.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
js/dna-runtime.js Adds the adapter layer for DNA shell hooks, pending import state, save/refresh, debug logging, and legacy browser bindings.
js/dna.js Replaces direct browser-global access with adapter calls and updates the delete and import guard flows.
js/dna-window-bindings.js Updates _saveAndRefresh to return explicit success or failure.
service-worker.js Adds the new DNA runtime module to the app shell cache list.

Reviews (2): Last reviewed commit: "Fail closed on DNA runtime gaps" | Re-trigger Greptile

Comment thread js/dna-runtime.js Outdated
Comment thread js/dna-runtime.js Outdated
@elkimek elkimek merged commit 9f97d2f into main Jul 5, 2026
5 of 6 checks passed
@elkimek elkimek deleted the codex/extract-dna-runtime-wiring branch July 5, 2026 11:46
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