Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactor: share semantic audit admission - #920

Draft
mldangelo-oai wants to merge 4 commits into
mdangelo/codex/shared-codex-executionfrom
mdangelo/codex/shared-audit-review
Draft

refactor: share semantic audit admission#920
mldangelo-oai wants to merge 4 commits into
mdangelo/codex/shared-codex-executionfrom
mdangelo/codex/shared-audit-review

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Managed scans and Deep discovery currently admit audit output through separate paths. Share one small, single-attempt operation and the existing semantic parser so a completed process cannot turn an unfinished audit checkpoint into an accepted result. Accepted audits may still report partial or unknown coverage.

Stacked on #917 for the shared execution boundary.

Changes

  • Add a 49-line internal operation that executes one attempt, checks cancellation, and returns accepted evidence or a checkpoint. Existing callers retain retry, persistence and completion ownership.
  • Reuse the plugin's semantic parser for canonical managed-scan documents and discovery drafts, preserving persisted IDs and legacy normalization.
  • Export the parser from the bundled helper without invoking its CLI on import. Preserve CLI behavior through a linked plugin directory, with a parent-failing regression.
  • Keep reducer execution, worker settings, permissions, public commands and result fields unchanged. Prepare the existing event fixture's audit draft before its finalizer runs.
  • Resolve the Windows policy proof helper from the SDK-only dependency installation used by native CI. Reuse the existing reader build correction; proof assertions and runtime worker environments are unchanged.

Testing

Current head: 67d586dd699fc5a1cad9afe8f53845bd14ba5842. All five portable checks pass. In an isolated SDK-only dependency layout on Linux, the original policy-proof build fails to resolve zod/v4; the corrected generated build succeeds. The changed tracked script is byte-identical to the green reader version. This is bundling evidence, not native Windows execution.

The preceding head b2512b30b97e52377b67ffb63fa49bd1658e45d5 has identical scan/runtime code and this full qualification on Linux, Node 24.20, CI-pinned Bun 1.3.14 and Git 2.43:

  • Full SDK suite with seed 12345: 3,016 passed, 50 skipped, 0 failed.
  • Full SDK suite with generated seed 1841630942: 3,016 passed, 50 skipped, 0 failed.
  • Full MCP suite: 49 passed, 0 failed.
  • SDK types, format, plugin build and bundled-helper regression: passed.
  • All required portable checks passed: Ruff check and format, SDK build:ci, plugin source compatibility and its Node test suite.
  • Normal pnpm pack, followed by the unchanged package checker: installed SDK and physically standalone plugin checks passed. Archive SHA256: b63d8dd9603a714045cac76605893aeb69c5a74ff43937d1430225c02d868b29.
  • Independent linked-helper checks: unchanged parent passed 4 cases, the initial extraction failed 2, and the correction passed all 4. The committed regression also fails before the correction and passes afterward.

Initial SDK failures were reproduced on the parent with a different Bun/Git toolchain and malformed enclosing Git metadata. Both complete runs above use the CI toolchain and a separate checkout. The first local package build followed linked dependency paths and failed the existing internal-reference check before installation; rebuilding the same source with physical local dependencies passed. Neither product checks nor assertions were weakened.

The original CI run failed in both Windows policy-proof helper bundles after the native primitives built successfully. The final build-only correction preserves those failures and leaves native verification to the new ordinary CI run.

Risk and rollout

Review and land after #917. This is an internal extraction with explicit artifact acceptance; it introduces no public flag, new dependency, migration or scheduler policy. Standalone bundling and helper import behavior are the main compatibility risks and have direct coverage. Native Windows/macOS CI remains to be observed for this exact PR. These deterministic checks do not establish scan quality, cost or latency equivalence.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

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