8000 fix(ci): steady Linux packages and two ACP tests by aorumbayev · Pull Request #191 · kagan-sh/kagan · GitHub
[go: up one dir, main page]

Skip to content

fix(ci): steady Linux packages and two ACP tests - #191

Merged
aorumbayev merged 8 commits into
mainfrom
fix/ci-reliability
Dec 4, 2026
Merged

aorumbayev merged 8 commits into
mainfrom
fix/ci-reliability

Conversation

@aorumbayev
@aorumbayev aorumbayev commented Dec 3, 2026 •
Copy link
Copy Markdown
Member

What

Linux jobs install their build packages from the actions cache, keyed on the list and the runner image, and apt points at archive.ubuntu.com instead of the azure mirror that stalls. A line an agent prints for itself is no longer answered on a pipe it has closed, which had settled a clean exit on Error. The ACP tests wait for what the product records: a clean quit is Idle, a crash is Failed, each chunk keeps its id.

Why

The package step hit its ten-minute cap three times in a day while a 26 MB WebKit library stalled on the azure mirror; the old fallback only ran when apt-get update failed, which a stalled download never does. The quit test failed on a loaded runner with never became Idle (it is Error).

How

-dev packages stay in the test shards: the WebKit library they need comes with libwebkit2gtk-4.1-dev, so a runtime-only list would not remove the stalled download.

Test plan

  • cargo t -p kg-core acp passes
  • A re-run of the Linux jobs stays green

The azure mirror stalls one package download for minutes, and the old
script only moved to archive.ubuntu.com after apt-get update failed, which
a stalled download never does. Point apt at archive.ubuntu.com first, and
keep the installed set in the actions cache, keyed on the package list and
the runner image. The five copies of the step become one composite action.
An ACP agent that ends settles its thread on Idle only after a clean exit
and on Failed otherwise (exit_end), but the quit test waited for Idle alone,
so a child that a loaded CI runner ended another way panicked "the thread
never became Idle" after the whole budget. Wait for either end event.

Two chunks written a line at a time are one row when both have arrived
before the log is read and two when they have not, so the id test's
single-row assertion failed under load with two rows that each kept msg_1.
Keep the id check and the words; a_burst_of_one_message_becomes_one_write
already pins the batching.
A cache hit unpacks files without dpkg's triggers, so the compiled schema
database was missing and WebKit's network process aborted on
org.gnome.system.proxy, which failed the Browser page step.
The restore skips the trigger that writes giomodule.cache, so the TLS
and proxy modules the cache brings are on disk but unknown to GIO.
The quit test accepted Idle or Failed after a fake agent that quits cleanly, so a
crashed fake agent passed it and CI's own failure stayed unnamed. The clean fixture
waits for Idle again, and a second test runs the agent to an `exit: 3` with no quit:
it waits for the Failed event, checks the person is told the code, keeps the agent's
last word and refuses the next prompt. The twin keeps its Idle wait too.
The package cache is keyed by an md5 and saved on the pull request's merge ref, so
the main-branch prune never saw it: closing the pull request left the files on disk
to evict a Rust cache, and a repo at 9.75 GB has no room for that. cache-prune now
also deletes the caches of a pull request that is no longer open, and 306 says so.
The two orphaned linux-tests caches 305 left on main are deleted.
The transport gave every stdout line to the protocol layer, which answers one it
cannot parse with a JSON-RPC error. An agent that prints a line of its own while
it goes — the fake agent is a test binary, so libtest writes its summary on the
same stdout — had that answer written to a pipe it had just closed. The failed
write ended the outgoing actor, the next line's answer failed, and the connection
reported an error although the process exited 0, so `exit_end` settled the thread
on `Error` for a clean exit. That is the ACP quit flake: `linux-tests (1)` job
145296169569 says "the thread never became Idle (it is Error)".

`pump` now forwards only a line that parses as a message. A line the agent prints
for itself asks nothing, so there is nothing to answer and nothing to write.
An agent that closes the read end kagan writes to and then prints a line of its
own made kagan answer that line on a closed pipe; the connection reported the
failed write as an error and a clean exit settled on `Error` — "the thread never
became Idle (it is Error)". The fake agent can now do exactly that, and the test
holds the exit to `Idle`.

Undone by hand, against the transport before the filter: fails in 10.7 s with
`(it is Error)`; with the filter: passes in 2.1 s.
@aorumbayev
aorumbayev marked this pull request as ready for review December 4, 2026 21:11
@aorumbayev
aorumbayev merged commit 7d9c726 into main Dec 4, 2026
73 checks passed
@aorumbayev
aorumbayev deleted the fix/ci-reliability branch December 4, 2026 21:11
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

0