Skip to content

fix(workflow): isolate Debian package outputs from cache state - #1101

Merged
donbeave merged 20 commits into
mainfrom
fix/debian-preview-output-isolation-20260923
Sep 27, 2026
Merged

donbeave merged 20 commits into
mainfrom
fix/debian-preview-output-isolation-20260923

Conversation

@donbeave

@donbeave donbeave commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Root cause

Preview arm64 packaging receives stale cache-restored Cargo workspace outputs. In run 35791295272, target/debian contained the old f7bc191 amd64 package beside the current 507e722 arm64 package. The collector intentionally reads only target/debian and exact target/$TARGET/debian, then fails closed on distinct names.

Fix

  • Generator reset now derives exact canonical=target/debian and target_root=target/$TARGET; no target/*/debian traversal.
  • Validate TARGET as one safe path component.
  • Reject symlink or non-directory components for target, canonical, exact target root/debian, and dist before deletion.
  • Use find -P only at the three exact output roots, depth 1, deleting only regular-file or symlink .deb/.deb.sha256 entries.
  • Emit the fix from both generator schemas and regenerate preview/release workflows.
  • Keep collector fail-closed behavior and add rendered-shell simulations for unrelated-target preservation, final symlink cleanup without following targets, and all intermediate/root symlink refusal.

Verification

Local:

  • cargo fmt --all -- --check
  • cargo test --locked -p velnor-workflow rendered_debian_reset: 4 passed
  • cargo test --locked -p velnor-workflow debian_collect: 4 passed
  • cargo test --locked -p velnor-workflow: 2737 passed
  • Pinned-generator --plain --check --pin-build: running locally

Normal merge ancestry:

  • current main second parent: 6391a0ce53b7e666d1bfb391083011622158f4f3
  • PR head: d5deb952676b4f22792a36b5fc89f29a068ee9cc

Do not merge automatically.

Clear cached package artifacts before each Debian packaging job so cargo-deb collects only the current architecture output.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

donbeave and others added 19 commits September 23, 2026 07:01
Use exact cargo-deb output roots and exercise stale cross-architecture packages in both collector roots.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
…tput-isolation-20260923

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
…tput-isolation-20260923

Signed-off-by: Codex <codex@openai.com>
Signed-off-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Keep candidate renderers in a dedicated environment slot so their manifest-verified artifact cannot shadow the declared pin. Preserve strict rejection for mismatched explicit pin binaries.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Preserve candidate and pinned renderer separation. Bind candidate artifact execution to its manifest build revision and run candidate builds with a scrubbed environment.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Preserve the Rust capability scan/config outputs while carrying the Debian stale-output cleanup forward. Regenerated workflow outputs remain current for the merged candidate source.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
@donbeave
donbeave merged commit 04e872f into main Sep 27, 2026
22 checks passed
@donbeave
donbeave deleted the fix/debian-preview-output-isolation-20260923 branch September 27, 2026 17:23
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.

2 participants