Repository navigation
Protect transferred environment files from Git staging - #706
Conversation
There was a problem hiding this comment.
Caution
The new admission check still allows transferred secrets to be staged by ordinary Git operations when a case-insensitive destination has a differently cased negation rule.
Reviewed changes Reviewed destination environment-file admission, the shared Git helper, clone regression coverage, and the corresponding documentation.
- Destination admission: Selected environment files must pass a case-sensitive, repository-only ignore check before creation in the private clone.
- Git helper reuse: The destination uses the existing bounded Git subprocess helper exported from the source-transfer service.
- Tests and documentation: Added source-only-exclude and case-matching regressions, updated security fixtures, and documented the destination requirements. All 44 focused tests passed on Linux; a separate reproduction confirmed the remaining staging gap described inline.
gpt-6.1-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the changes since 7c60fdf, covering the dual-case Git admission check, regression coverage, and updated documentation.
- Required both case modes: Environment filenames must pass repository-only ignore checks with both
core.ignoreCase=falseandcore.ignoreCase=true, closing the mixed-case negation bypass. - Extended behavioral coverage: Added rejection tests for mixed-case negations and global-exclude-only protection, and verified ordinary staging leaves an accepted environment file out of the index.
- Updated the documented policy: Clarified both case-matching requirements in the Remote guides and project memory.
Validation: all 46 focused clone, workspace, source-transfer, and handler tests passed on Linux; focused ESLint passed. macOS-specific filesystem behavior was not rerun.
gpt-6.1-sol | 𝕏
…ambitcreate/aiden-agent into feature/ci-e2e-rebalance
Main's four-shard E2E layout replaces this branch's CI weight changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

A source-only Git ignore rule can make an environment file eligible for transfer even though the cloned destination would stage it. Before writing selected files, the receiving host requires each name to be ignored by repository rules in both Git case-matching modes. The clone is rejected if either check fails, and user-level excludes alone do not satisfy admission.
A real-clone regression reads an environment file ignored only by the source and verifies the unprotected destination is rejected. A follow-up regression covers
.env*followed by!.ENV.localwith case-insensitive staging. Before the follow-up, transfer succeeded and ordinarygit add -A -- .staged the synthetic secret. It is now rejected before publication. A destination with a committed.env*rule still accepts the file and ordinary staging leaves it out. Another regression verifies that a global exclude alone cannot satisfy the check.Validation
git diff --checkpassed.CI execution-budget interruption
Electron E2E (3/3) exceeded the existing 20-minute job budget after starting 110/117 tests; the last started case was
tests/e2e/workspace-panel.spec.ts:306. No failed assertion or flaky-test result was reported before cancellation in the inspected log. Run/job, exact head03d02eb3a248201f1618a9f835828ebf46840512.The workflow subsequently completed. After verifying the PR remained open at the exact job/run head, one job recovery was accepted on 2026-11-03. This spends the single recovery budget; no additional manual recovery will be requested for this job. Timeouts, retries and fail-on-flaky policy remain unchanged.
Single recovery outcome
The one permitted recovery job also exceeded the fixed 20-minute job budget. All 117 cases had started; the last was
tests/e2e/workspace-panel.spec.ts:525(browser superseded create), four seconds before cancellation. No assertion failure or flaky-test result was reported before cancellation in the inspected log. This is not a completed passing shard. The recovery budget is spent: no further manual rerun, no timeout/retry/gate weakening and no no-op CI reset. Exact-head hosted validation remains blocked while independent work continues.Scheduling correction and fresh validation
PR #719 refreshes the Electron file weights using the observed shard windows and adds an independent completed-run comparison. This PR now targets that dependency, which is stacked on the separate UUID correction in #718. The environment-ignore diff remains scoped to this finding. The previous cancelled job and single recovery above remain part of the record; no further rerun was requested. The dependency merge creates a new exact head for fresh CI with the original shard count, worker count, timeouts and flake policy unchanged.
After merging the dependencies, the focused workspace-intake, Remote workspace and peer-project-source tests passed (42 tests), as did CI policy (67 tests), CI registry (15 tests), targeted ESLint and
git diff --check.