Repository navigation
fix(update): codify Codex install-state repeatability - #430
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR tightens install/update repeatability for airc by fixing how cmd_update observes --force during argument parsing and by treating the per-install .channel state file as local install metadata instead of repository dirt. In the broader codebase, these changes improve the reliability of the release-channel/update flow that install.sh, airc update, airc channel, and airc version all share.
Changes:
- Parse
--force/-fincmd_update’s main option loop so the flag still works after argument shifting. - Ignore the install-local
.channelfile in Git so normal channel changes no longer leave installed checkouts looking dirty.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
lib/airc_bash/cmd_update.sh |
Moves --force handling into the primary update option parser so repeat updates can auto-stash as intended. |
.gitignore |
Ignores the persisted channel-selection file to keep installed clones clean after normal channel operations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ;; | ||
| --canary) requested_channel="canary"; shift ;; | ||
| --main) requested_channel="main"; shift ;; | ||
| --force|-f) force=1; shift ;; |
joelteply
added a commit
that referenced
this pull request
May 2, 2026
…ore additions (#431) feat(logs): airc logs --since <ts|Ns|Nm|Nh> for incremental polling + Windows install-state .gitignore ## Why Codex hit context exhaustion 2026-05-02 after a session where it polled `airc logs N` on every prompt-cycle (the satellite-mode pattern from the just-shipped peer-architecture discussion). N=50 = ~7K tokens re-injected per turn → quadratic context burn. Fix: incremental polling. Agents that re-poll the bus pass the ts of their last-seen message and get only NEW events back. O(delta) per turn instead of O(N). ## API ``` airc logs # tail 20 (default, unchanged) airc logs 100 # tail 100 (unchanged) airc logs --since 5m # only msgs newer than 5min ago airc logs --since 60s # 60 seconds ago airc logs --since 1h # 1 hour ago airc logs --since 2d # 2 days ago airc logs --since 2026-05-02T19:30:00Z # ISO timestamp airc logs 100 --since 5m # tail 100 then filter (combine) ``` `--since` filters happen client-side after `tail -N` reads from messages.jsonl. Agents using `--since` should pass a generous N (e.g., 200) since old messages get filtered out — and use the ts of their last-seen msg as the next call's --since. Backward-compatible — `--since` is optional, no-arg behavior unchanged. Bogus --since args fail with a clear error + exit 2. ## Verification (6/6 pass) - backward compat (`logs 5`): ✓ - relative offset (`--since 5m`): ✓ (filtered to 3 recent) - impossible window (`--since 1s`): ✓ (0 lines) - bogus arg (`--since garbage`): ✓ ("cannot parse 'garbage'", exit 2) - ISO timestamp (`--since 2026-05-02T19:50:00Z`): ✓ - `--help`: ✓ (clean usage) ## Bonus: 2 more files in .gitignore b69f's Windows QA on #430 found 2 untracked install-state files at repo root that still trigger `(dirty)` even after #430: - daemon.err (post-#421 daemon launcher stderr) - install-elevated.ps1 (Windows elevation helper from install.ps1) Same fix-shape as #430's .channel: per-install runtime state, never source. Folded into this PR rather than a one-line PR — both are context-burn-related (clean version output is less context noise to agents that grep for `(dirty)` as a signal). ## Pairs with - #430 (.channel ignore — same shape, different files) - #422 (canary→main bundle — this further hardens what ships) - The ongoing "make airc reliable across all agent kinds" work — this is a Codex-discovered gap, fixed by an airc primitive that benefits every poll-mode consumer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Codex dogfood exposed two install/update repeatability issues that should live in the public repo, not as local machine patches:
Fix
Verification
Codex CLI 0.128.0 dogfood catch while validating #428 / #422 Codex install path.