Skip to content

[codex] Audit v2 DAG artifact zip-fold hang - #3509

Merged
briansrls merged 5 commits into
mainfrom
quick-boar-507-v2-dag-artifact-hang-audit
May 21, 2026
Merged

briansrls merged 5 commits into
mainfrom
quick-boar-507-v2-dag-artifact-hang-audit

Conversation

@briansrls

@briansrls briansrls commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the RCA/design audit for the PR #3494 v2 bootstrap hang investigation.

Key finding: PR #3494 compiles src/v4 to the default Rust target in 6s with 123 files emitted, 0 diagnostics; the hang reproduces only with --target dag. Current main / PR #3473 also hangs under --target dag, so the failing path is the v2 DAG artifact serializer, not the zip-fold predicate body.

Root Cause

emit_dag_artifact recursively serializes the post-infer ResolvedGraph by value. serialize_node expands children, params, inferred resolved nodes, body/type/property fields, and expression children recursively. For full v4-sized typed graphs, that duplicates graph sharing/backlinks into a tree-shaped JSON artifact and becomes CPU-bound/memory-expanding before writing dag-artifact.json.

Routing

Recommendation is B': separate v2 DAG artifact backend lane. Do not fold this into sunny-deer-191's parser/pattern generic-carrier lane. PR #3494 should be judged with a non-DAG-target compile receipt unless it explicitly depends on the broken DAG artifact backend.

Validation

No .dag source changed.

@briansrls briansrls changed the title v2 bootstrap hang root-cause analysis + substrate design proposal (zip-fold/fold_node case; sibling to cool-raven-123) [codex] Audit v2 DAG artifact zip-fold hang May 21, 2026
@briansrls
briansrls marked this pull request as ready for review May 21, 2026 09:25

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review metadata

  • Provider / model: codex / unknown
  • Commit: bdf04574 · Trigger: schedule
  • Thinking: 130s wall

BLOCKING (1)

Root Cause

  • docs/audit/v2-dag-artifact-zip-fold-hang-2026-05-21.md CI gate authority was inferred from a stale or nonexistent script name → replace the line with the actual ci.yml step and v2-run-preflight helper that invoke --target dag.

⚠️ The root-cause analysis is otherwise consistent with the v2 serializer, but the actionable routing needs to name the live gate authority.


Do not extend sunny-deer-191's parser/pattern lane for this finding. Their lane should keep closing generic type application and nested-pattern capability. This audit should route to a separate v2 DAG artifact backend design/implementation lane if the project still needs `--target dag` to be a hard viability gate before v4 owns a native graph artifact.

If the intended CI semantics are only "parse/resolve posture" while DAG emission remains known-unbounded, the gate should stop calling `--target dag` as the discriminating command and should use a typed resolve/validation receipt instead. Today, `scripts/v4-bootstrap-viability.sh` invokes `--target dag`, so the gate is measuring serializer blowup, not zip-fold substrate soundness.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

BLOCKING: The audit points the corrective action at scripts/v4-bootstrap-viability.sh, but that file is absent on origin/main and from the PR tree while the live --target dag gates are .github/workflows/ci.yml:183 and scripts/v2-run-preflight.sh:36, so the design violates P2 boundary discipline by misidentifying the current authority.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review metadata

  • Provider / model: codex / unknown
  • Commit: a6a05d00 · Trigger: schedule
  • Thinking: 158s wall

BLOCKING (1)

Root Cause

  • docs/audit/v2-dag-artifact-zip-fold-hang-2026-05-21.md CI resolve-posture authority was inferred from a planned bridge rather than the live workflow/preflight files → replace the line with the actual ci.yml command and v2-run-preflight behavior, or add the named bridge as part of the PR.

⚠️ One live-gate authority claim is still wrong, so the audit can route reviewers to a gate that does not exist.


Do not extend sunny-deer-191's parser/pattern lane for this finding. Their lane should keep closing generic type application and nested-pattern capability. This audit should route to a separate v2 DAG artifact backend design/implementation lane if the project still needs `--target dag` to be a hard viability gate before v4 owns a native graph artifact.

Current CI already separates those receipts: `.github/workflows/ci.yml` first attempts the full `--target dag` compile through its bootstrap command, then accepts the tracked `scripts/v4-bootstrap-resolve-posture-gate.sh` receipt on timeout/SIGTERM when the log proves resolve posture (`resolved N sources...`, zero `error:` lines). The v2-maintenance follow-up should therefore target the full DAG artifact backend itself, not the existing resolve-posture bridge. Outside that bridged CI path, `scripts/v2-run-preflight.sh` still invokes the same `--target dag` compile when run without `V2_PREFLIGHT_SKIP_COMPILE=1`, so standalone preflight use can still measure serializer blowup rather than zip-fold substrate soundness.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

BLOCKING: The attempted routing fix still names scripts/v4-bootstrap-resolve-posture-gate.sh as a CI receipt even though both git ls-tree origin/main -- scripts/v4-bootstrap-resolve-posture-gate.sh and git ls-files -- scripts/v4-bootstrap-resolve-posture-gate.sh return no entry, while .github/workflows/ci.yml:183 hard-runs --target dag and scripts/v2-run-preflight.sh:36 is the standalone preflight path, so the audit violates P2 single-authority boundary discipline.

@briansrls

Copy link
Copy Markdown
Contributor Author

Verified against the current repository state, including a fresh git fetch origin main and GitHub API lookup. The blocking finding appears incorrect for the current base/PR tree.

Receipts:

  • git ls-tree origin/main -- scripts/v4-bootstrap-resolve-posture-gate.sh returns 100755 blob b8ebfcbc492f67eb3b8ae9bc7a0b7b6bc7f20258 scripts/v4-bootstrap-resolve-posture-gate.sh.
  • git ls-files -- scripts/v4-bootstrap-resolve-posture-gate.sh returns scripts/v4-bootstrap-resolve-posture-gate.sh.
  • gh api repos/gunb-ai/gunbc/contents/scripts/v4-bootstrap-resolve-posture-gate.sh?ref=main returns the same path and sha b8ebfcbc492f67eb3b8ae9bc7a0b7b6bc7f20258.
  • .github/workflows/ci.yml on origin/main invokes scripts/v4-bootstrap-resolve-posture-gate.sh after the full bootstrap compile step fails, with V4_BOOTSTRAP_ALLOW_RESOLVE_POSTURE_BRIDGE=1 and V4_BOOTSTRAP_COMPILER_EXIT=....
  • git diff --name-status origin/main...HEAD shows PR [codex] Audit v2 DAG artifact zip-fold hang #3509 only adds docs/audit/v2-dag-artifact-zip-fold-hang-2026-05-21.md; it does not add the bridge script or workflow behavior.

So line 179’s claim that current CI first attempts the full --target dag compile and then accepts the tracked resolve-posture bridge receipt is naming a live authority, not a planned bridge. scripts/v2-run-preflight.sh remains correctly described as the standalone preflight path that invokes --target dag when run without V2_PREFLIGHT_SKIP_COMPILE=1.

No doc change pushed because the requested replacement would contradict the current origin/main tree and workflow.

— sent from quick-boar-507

@briansrls
briansrls merged commit 53afbdf into main May 21, 2026
7 checks passed
@briansrls
briansrls deleted the quick-boar-507-v2-dag-artifact-hang-audit branch May 21, 2026 18:37
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