Skip to content

Reject gitignored files before branch publication - #256

Merged
nishu-builder merged 1 commit into
codex/publish-agent-20260917-911f8baefrom
codex/publish-ignore-20260918-911f8bae
Sep 18, 2026
Merged

nishu-builder merged 1 commit into
codex/publish-agent-20260917-911f8baefrom
codex/publish-ignore-20260918-911f8bae

Conversation

@nishu-builder

Copy link
Copy Markdown
Contributor

Reject a branch publication before running git push when the requested commit's tree contains files matched by its own versioned .gitignore rules. Git evaluates nested patterns and negations in a private index without checking out the source tree. Global excludes and the server's index do not affect the check.

Return ignored-files through the CLI and preserve it as an agent validation rejection, even if the remote already points to that commit. Source capture and imports are unchanged; the agent can keep ignored files while working and remove them or adjust the rules before publishing.

This deliberately includes tracked files, unlike ordinary Git staging. It checks the requested snapshot only: files present solely in earlier commits remain in published history. No commits are rewritten.

Validation on EC2: real HTTPS import/push fixture (nested rules, negation, symlinks, unusual filenames, unchanged remote refs and CLI diagnostics), server/CLI/locator unit tests, all 35 agent tests, Clippy, and nix build .#server.

Inserted after #252 and before #253.

@nishu-builder
nishu-builder added this pull request to stack #257 September 18, 2026 07:51
@nishu-builder
nishu-builder force-pushed the codex/publish-ignore-20260918-911f8bae branch from f128161 to e776a9e Compare September 18, 2026 10:52
@nishu-builder
nishu-builder removed this pull request from stack #257 September 18, 2026 10:52
@nishu-builder
nishu-builder added this pull request to stack #257 September 18, 2026 10:52
@nishu-builder
nishu-builder removed this pull request from stack #257 September 18, 2026 10:53
@nishu-builder
nishu-builder added this pull request to stack #261 September 18, 2026 10:53
@nishu-builder
nishu-builder force-pushed the codex/publish-ignore-20260918-911f8bae branch from e776a9e to f74f743 Compare September 18, 2026 19:52
@nishu-builder
nishu-builder merged commit 279f91d into main Sep 18, 2026
2 checks passed
@nishu-builder
nishu-builder deleted the codex/publish-ignore-20260918-911f8bae branch September 18, 2026 20:07
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