Skip to content

DEN-567: close remaining secret argv residue (#350) - #377

Closed
ORESoftware wants to merge 10 commits into
mainfrom
fix/DEN-567-issue-350-secret-argv-residue
Closed

ORESoftware wants to merge 10 commits into
mainfrom
fix/DEN-567-issue-350-secret-argv-residue

Conversation

@ORESoftware

@ORESoftware ORESoftware commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Refs #350 (DEN-567). Builds on already-merged #356/#366 and has now been semantically reconciled with current main.

Current scope

  • src/external_subcommands.rs: remove legacy routing that converted removed secret argv spellings such as --token <value> into child ZED_PKG_TOKEN; fail closed for removed secret spellings while preserving passthrough after --.
  • src/ops.rs and src/graph_export/download.rs: stop directing users toward removed secret CLI flags.
  • README.md: document ZED_PKG_TOKEN as environment-only and remove the --token "$ZED_PKG_TOKEN" example.
  • tests/secret_argv_boundary.rs plus router coverage: prevent the removed secret argv surface from returning.

Semantic conflict resolution

Current main had independently advanced Cargo.lock, src/install_graph/hardening_tests.rs, the GitHub source-fallback stack, environment contracts, and the latest-dependency gate. Those mainline versions were preserved rather than reviving this PR's stale baseline-repair commits. The merge reconciliation commit is 0176182fdaf74540d628c13ccd54a2215f50bc12.

The branch now differs from current main only in the five DEN-567 feature files above; generated/lock state comes from main. Merge requires fresh exact-head substantive CI and normal independent review/protection requirements.

ORESoftware and others added 4 commits September 12, 2026 16:40
Cargo.toml pins zed-lock at rev 1db0da00d30fcf2e0762f50eedb1f88458020b52
but Cargo.lock still recorded 1a95bb87272ac7b08895cea1f61743cf40321213
after the 2026-09-12 fleet integration merge, so every `--locked` build
on main failed before compiling. Only the git source line changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… tests

A stray trailing `use crate::registry::registry_for;` duplicated the import
at the top of the file (E0252), so the lib test target did not compile.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Main already rejects `--token` and `--zed-pkg-auth-password` fail-closed
before dispatch. This removes what still contradicted that contract:

- external subcommand router no longer lifts `--token` into a child's
  ZED_PKG_TOKEN and independently refuses to route any removed secret
  spelling (bare or `=` inline) so a secret can never reach a child's argv
  or environment even if startup ordering changes;
- login and graph download diagnostics no longer tell users to pass
  `--token`;
- README documents ZED_PKG_TOKEN as env-only, drops the `--token` example,
  and states the fail-closed (no warn-and-accept) policy;
- tests: router unit test for all secret spellings, and a docs/diagnostics
  guard against re-advertising the removed flags.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Keeps the new router test inside the repository's clippy expect_used
policy so the branch adds no clippy findings over main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

DEN-567

Copy link
Copy Markdown
Contributor Author

Please separate the current-main baseline repair from the DEN-567 secret-argv work, and do not downgrade Cargo.lock from zed-lock@1a95bb87272ac7b08895cea1f61743cf40321213 back to 1db0da00d30fcf2e0762f50eedb1f88458020b52. The later 1a95… revision was reviewed in #303 to add Windows ERROR_SHARING_VIOLATION normalization on top of the earlier lock-violation fix, with an added libc dependency. Sep-12 main's actual mismatch is that Cargo.toml and several provenance assertions regressed to 1db0… while the newer resolver-owned lock entry survived. DEN-567's router/error-message/README/tests remain useful; salvage those on top of a forward repair to 1a95… rather than using the lock downgrade as the baseline.

Preserve the DEN-567 feature files that remove secret argv residue and add negative coverage. Take current main's newer Cargo.lock, install-graph hardening test state, GitHub fallback implementation, latest-dependency gate, and environment-contract work instead of reviving stale baseline repairs.
Preserve the five reviewed DEN-567 feature files while taking main's newly merged public CLI portability workflow at its canonical merged SHA. Keep current lock/fallback/environment/hardening state from the earlier semantic reconciliation; do not revive stale baseline repair commits.
Preserve the five reviewed secret-argv feature files while taking current main's exact rustfmt-clean env/TOML files. This removes inherited formatting noise without changing DEN-567 behavior.
Preserve the reviewed five-file secret-argv boundary tree exactly while incorporating current main as the second parent. Current-main comparison proves the candidate differs only in the DEN-567 feature files.
Rebuild the candidate from current main after #380, overlaying only the five reviewed secret-argv boundary files. This preserves the newly landed registry alias and avoids reviving stale branch state.

Copy link
Copy Markdown
Contributor Author

Current-head audit at b053604de74202dbe240b151661da6e87582786b: several substantive lanes are green, including formal review/methods, nix-interop, ores-lint, copy-mode OCI, frozen-lock integrity, durable manifests, develop-shell, polyglot, and candidate smoke. However multiple workflows executed and failed (ci, CLI portability, repository hardening, fp-conformance, latest-deps, nested/self install modes, zed-tip canary, native task runtime, etc.). These are not steps=null/zero-minute evidence and therefore remain merge blockers. Keep the five-file DEN-567 secret-argv scope intact; classify/fix executed failures rather than weakening the secret boundary.

@the1mills the1mills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The DEN-567 feature itself is still narrowly scoped to five files, but this head is now 110 commits behind current main and GitHub reports it non-mergeable. The prior macOS nextest failure was in develop_edge_cases::cargo_adapter_configuration_is_root_anchored_in_the_development_home, outside those five feature files, so I am not attributing that baseline/platform failure to the secret-argv change. However, the existing approval is stale. Merge current main into this branch (no rebase) and preserve current-main versions of every file outside README.md, src/external_subcommands.rs, src/graph_export/download.rs, src/ops.rs, and tests/secret_argv_boundary.rs; then semantically reapply only the DEN-567 removal of secret argv routing/docs. Re-run the full exact-head matrix, including macOS, and require the five-file diff against the merged baseline before re-approval.

@the1mills the1mills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking executed exact-head failures. The latest-dependency gate builds the candidate successfully but fails while resolving/replaying latest allowed dependencies. The native task runtime runs formatting, focused tests, and current-main compatibility successfully on Windows, macOS, and Ubuntu, then fails strict Clippy on all three platforms. Several additional exact-head workflows are also red. These are substantive failures, not zero-step runner admission. Fix the cross-platform Clippy errors and dependency replay/canary failures, rerun the full exact-head matrix, and re-request review only after the failing workflows are stepful and green.

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