Repository navigation
refactor(domain): move the native section directory and ELF string readers into domain - #11449
Conversation
…aders into domain
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
[Low impact] The reviewed changes appear safe to merge and are already present in local SummaryMoves the shared section and ELF string readers into
No new actionable issues or security regressions found. The manual qualification script was not run because its external corpus was unavailable. Reviews (3) · Last reviewed commit: "test(native): fingerprint the moved sect..." · Reviewed by Greptile |
|
Greptile issue 1 (JNI qualification script) is valid and fixed in d704050. The root cause: |
Summary
Moves the native section directory and the ELF string readers into
src/domain/native/, usinggit mvand specifier rewrites:src/native/metadata/NativeSectionDirectory.tsbecomesnativeSectionDirectory.ts;ElfSectionNameTable.tsbecomeselfSectionNameTable.ts;ElfStringTable.tsand its test becomeelfStringBytes.tsandelfStringBytes.test.ts.All three are I/O-free format readers over admitted bytes. They depend only on domain modules and
node:zlib, which decodes compressed ELF sections in memory.The gpu provider imports them, so
gpu -> native(5) leaves thecrossProviderbaseline.Refs #11359. Part of plan W9.
Problem and expected behavior
gpu read ELF, PE and Mach-O section directories and ELF strings from the native provider's internals (
native/metadata/*). Expected: format readers that do no I/O live with the other domain format readers (#11415, #11331), and providers import them inward.Change and scope
src/native/metadata/NativeSectionDirectory.test.tsstays innative. It builds inputs from native fixtures (BinaryHardening.fixture,ElfUnwindTables.fixture,ElfNotes.fixture), which a domain test cannot import. It now imports the reader fromdomain.tests/support/analysis-efficiency/android-jni-library.mjs: the fingerprint list names the new path. Greptile found this; it is a computed path string, so the specifier rewrite did not see it.crossProvidergpu -> nativeis removed.raw-buffer-readentry forElfSectionNameTable(6) is re-keyed to the new path, with the same count.Not included: the il2cpp, go and rust imports of
readBinaryContainer,MachoSliceSelection,ElfPointerRelocationsandAppleMacho*. Those form a larger set and get a separate PR.Contract and boundary impact
docs/public/product-catalog.json), package, or installation impact: none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
Tests added or updated: specifier updates only.
Base reproduction or other evidence:
node scripts/verify-module-boundaries.mjs --shrink-layer-baselinereportedcross-provider import gpu -> native: 0, baseline 5.User-visible CLI/MCP output (if applicable): none.
Remaining proof gaps: none.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
npm run check:fast: passed. The pre-push hook passed.node scripts/verify/architecture-guards.mjs: passed after the re-key.npm run test:focused -- src/native/metadata/NativeSectionDirectory.test.ts src/domain/native/elfStringBytes.test.ts src/native/elf/ElfNoteParser.test.ts src/native/initializers/ElfInitializerRelocationCoverage.test.tsplus the first 8src/gpu/*.test.tsfiles: 154 passed, 1 skipped.Compatibility, safety, and release
The move commit will be listed in
.git-blame-ignore-revsafter merge.Author readiness
Human owner:
Before merge
type(scope): outcome.