Skip to content

refactor: prune internal seams and preserve configuration ownership - #10430

Merged
morluto merged 9 commits into
mainfrom
codex/codebase-cleanup-audit
Nov 14, 2026
Merged

morluto merged 9 commits into
mainfrom
codex/codebase-cleanup-audit

Conversation

@morluto

@morluto morluto commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Summary

Remove internal exports, wrappers, retired experiment code and tests that kept those paths alive. Consumers now use the owning contracts and shared artifact-failure projections. Keep supported Evidence, client registrations, provider bridges and target formats.

Behavior and scope

  • Preserve YAML source keys, aliases and inherited settings when refreshing Hermes and Goose registrations. Refuse ambiguous removals before writing; removing a registration inherited from a shared YAML merge still requires editing the shared source.
  • Retain verifier cleanup owners when cleanup fails, and identify Hopper prepared images using the session run ID rather than a PID alone. Correct the FAT64 malformed fixtures and test discovery for unowned tests and import self-cycles.
  • This is maintenance within existing contribution scope; no new provider or target-execution authority. No intended CLI/MCP catalog or Evidence contract change. The pre-existing local Cutter verifier edit is excluded.

Evidence and validation

  • On the source checkout before applying the change to current main: npm run test:changed passed 625 files / 14,618 tests, with 12 platform or filesystem skips; npm run test:python passed 151 tests; npm run check:fast, npm run docs:check, npm run knip, and npm run verify:architecture-guards passed.
  • Real Hopper on this Mac: verify:hopper:fat, verify:hopper:fat64, and verify:hopper:callers passed; FAT64 rejected five malformed fixtures and verified prepared-image cleanup. Real Ghidra and Hopper deadline workflows were not run.
  • The broad boundary run was interrupted after one deadline case spanned a 3,296-second low-power sleep. That entire eight-test file passed on an isolated rerun; remaining process-boundary files are running separately. No final result is claimed for the interrupted run.
  • On the PR branch based on current main: npm run format:check, npm run verify:test-discovery, and git diff --check passed. Additional validation is in progress.

YAML's JavaScript projection can still collapse distinct source keys; preservation and ambiguity checks cover the edited paths, but retaining full native key identity across all consumers remains open. Linux-only pwntools and Windows-specific paths were not verified on this Mac. Automated validation does not establish human review.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@morluto
morluto marked this pull request as ready for review November 13, 2026 22:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8930dd8c31

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T07:34:47.593897Z 1195935 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The reviewed changes appear safe to merge; no new blocking issue was found.

Summary

This PR removes internal exports and retired experiments, shares artifact-error helpers, and preserves YAML configuration ownership.

  • Hermes and Goose registration edits keep the surrounding YAML source details.
  • Verifier cleanup keeps the resource owner available when cleanup fails.
  • Artifact readers and providers use shared failure projections.
  • Callers now use the modules that own shared contracts.
  • Retired packet, SAZ, and signal experiment readers and their checks are removed.
  • Test and repository checks now cover more file types and import-cycle cases.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Read YAML source] --> B[Build requested registration]
  B --> C{Would a retained merge restore an omitted setting?}
  C -- Yes --> D[Refuse edit and keep file unchanged]
  C -- No --> E[Keep source keys, aliases, and inherited settings]
  E --> F[Return edited YAML]
Loading

Reviews (8) · Last reviewed commit: "fix(setup): refuse removing an overridde..." · Reviewed by Greptile

Resolve javascriptSemanticAsyncEffects imports: isUnmodifiedGlobalReference
now lives in javascriptSemanticGlobalReference (this branch), while main's
createGlobalReferenceReader and semanticOpaqueGlobalMayHaveChanged keep
their owners.
…refresh

- Reuse an unchanged YAML collection only while every alias in it still
  resolves after the edit; otherwise rebuild it so the alias becomes its
  value. A sibling anchor replaced or moved in the same refresh no longer
  leaves an unresolved alias in Hermes or Goose output.
- Keep a connection selector whose existing value already chooses stdio
  (for example an inherited Hermes transport: stdio) instead of superseding
  it; remote selectors are still replaced. Explicit stdio selectors are
  therefore no longer rewritten (Kimi expectation updated).
- When the whole Hermes registration is inherited through a merge,
  override it with that merge and write only the changed fields.
A key written as an alias to a string scalar (for example *field with
field: &field env) was treated as a source-only key, so any change to
its value was refused in Hermes and Goose. Resolve such keys to their
string, keep the aliased spelling while its anchor survives the edit,
and write the plain key when the same edit rebuilds the anchor.
Both cancellation tests awaited a bare started promise and released
their gates only on success, so a missed boundary waited for the outer
deadline and could leave cleanup parked. Use awaitAcknowledgement and
release and join the cleanup in finally.
Replace the pre-edit alias survival guess, which expanded aliases to
sibling anchors that survive unchanged, with an exact repair: record
what each alias in the replaced value resolves to, write the edit, then
replace only aliases left without a preceding anchor by that value.

- Keep an aliased key's source position, so its anchor stays ahead of
  later aliases.
- Treat an aliased key as its string only when no other key in the map
  resolves to the same string; an ambiguous one stays guarded.
- Override an inherited Hermes registration only when the requested
  entry keeps every inherited field, so an explicit replacement can drop
  remote selectors.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e4929a94ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…ments

An alias whose own anchor was removed could resolve to an earlier anchor
with the same name and silently change value. Record the node each alias
resolved to and repair any alias that no longer resolves to that node.
Carry the alias's comments and spacing onto the repaired value.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8d01c52f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The merge-retention check skipped keys the mapping also overrides, so
dropping such a key (for example a remote url during an explicit stdio
replacement) let the retained merge restore it. Check removal before
skipping overridden keys, so the edit is refused with the existing
message instead of producing a registration that cannot be applied.
@morluto
morluto merged commit b138f52 into main Nov 14, 2026
96 of 101 checks passed
@morluto
morluto deleted the codex/codebase-cleanup-audit branch November 14, 2026 09:08
@morluto morluto added the area: setup Setup, packaging, upgrade, install, Doctor, and client registration label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant