Repository navigation
2.24.1: six ciris-agent upgrade fixes - #1389
Merged
Merged
Conversation
From an independent review of 2.24.0's upgrade path, each checked
against the code and each with a regression test that fails on 2.24.0:
- the running record is checked against the process start time, and
removed at a clean exit, so a reused pid is never stopped or ended;
- _end_process_tree skips this process (the Upgrade button's upgrade
is a descendant of the CIRIS it closes) and waits after kill;
- under systemd the helper runs `systemctl --user start` to the end
(it is the transient unit's main process), and waits 120 s, past
systemd's 90 s stop timeout;
- systemd-run is waited for before the unit is stopped; a failing
systemd-run or stop is exit 1 and stops nothing; template units get
a valid transient name; PATH is passed so uv is found;
- a relaunch that cannot start is logged and gives a non-zero exit;
- release parts are ASCII digits, at most 9 each ("²".isdigit()).
Version 2.24.1-stable; iOS Resources.zip rebuilt from source.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RmimP6te8rzywPKKLNFk17
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Nov 29, 2026
The agent sometimes sent its previous answer again. _get_channel_history
reversed every adapter's result ("the bus returns newest-first"), but
the API adapter returns oldest first. So API history reached the model
newest first while numbered MESSAGE_1..N as if chronological, and every
marker carried the read time. The model saw "user asks the current
question; CIRIS answers it" from the previous turn's reply and sent it
again: 43 recycled answers in the safety batteries since 2026-09-24
(ja 11-29 run 46234462958: the q02 ASPDMA prompt's history is
[q02, answer to q01, q01]).
- _chronological(): sort by each message's own time; fall back to the
newest-first convention only when an adapter gives no time.
- Each history marker carries the time the message was sent.
- Tests for oldest-first, newest-first and shuffled adapter output, the
exact bug shape, marker times and timestamp parsing; 5 fail on the
2.24.0 observer.
iOS Resources.zip rebuilt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RmimP6te8rzywPKKLNFk17
… E1/E2); one 2.24.1 changelog section Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RmimP6te8rzywPKKLNFk17
|
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
This fixes six bugs in
ciris-agent upgrade. An independent read-only review of 2.24.0's upgrade path (NEONCRU, run with Eric's OK) found them, and I checked each one against the code. Every fix has a regression test, and all 15 new or changed test cases fail on the 2.24.0 code (checked by running the suite againstorigin/main's two modules).run/ciris-agent.jsonoutlives a crash, and onlypid_existsis checked. Once Windows reuses the pid, upgrade stops that program, waits 20 s, then kills its tree.started(create_time) and is checked to within 1 s.atexitremoves our own record. A bool, 0 or negative pid is ignored. A 2.24.0 record with nostartedis still trusted.ciris-agent upgradeis a descendant of CIRIS, so_end_process_treeterminated it.os.getpid(), catchespsutil.Error, and waits afterkill().systemctl --user startand exited, and the unit's teardown kills the start.--relaunch-syncruns the start to the end, logs its exit and returns it.systemd-runwas Popen'd, then the unit it may be inside was stopped. A failure was ignored and the command returned 0.systemd-runis waited for (timeout 30 s). A non-zero exit raises, and nothing is stopped. A failed stop gives exit 1.ciris@xgets the transient nameciris-x-upgrade-N.--setenv=PATHlets uv be found.--wait-timeout 120under systemd.--to 2.²4.0--to 2.²4.0raised ValueError with exit 1.[0-9]{1,9}in both modules.Not changed:
Scripts\ciris-agent.exeoutlivespython.exeby milliseconds. pip reaches the scripts seconds later.Version 2.24.1-stable. iOS
Resources.zipwas rebuilt from source, and the upgrade modules and constants inside it match the tree byte for byte.Test plan
tests/ciris_engine/test_upgrade.py+test_desktop_payload_jre.py: 80 passed, 1 skippedupgrade.pyand_upgrade_helper.py: 15 failed (the new cases), 60 passed🤖 Generated with Claude Code
https://claude.ai/code/session_01RmimP6te8rzywPKKLNFk17