Conversation
The runtime fixtures flush every session from agents.list() during teardown. A member's continuable session can be retired from the store while that loop runs; the flush then throws "session ... is not live in this store" and the scenario exits 1 after its behavioral assertions already passed (observed once on CI in captain-idle-wakeup, run 34555573487). The flush now skips that specific failure - a retired session has nothing left to flush - and still propagates every other error. Applied to the four fixtures sharing the idiom (idle, resume, entry, web-approval): the compatibility gate treats any scenario failure as fatal, so the same window can turn any of them red. Refs NanmiCoder#154
Contributor
Author
|
Closing this out — @NanmiCoder's liveness guard in 68fe529 ( |
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.
What this fixes
The runtime fixtures share one teardown idiom:
If a member's continuable session has already been retired from the store by the time the loop reaches it,
ctx.sessions.flushthrowssession "<id>" is not live in this storeand the scenario exits 1 — after the behavior under test has already been demonstrated. Observed once on CI incaptain-idle-wakeup(Real Harness (0.1.2-alpha.5), run 34555573487, PR #147 head 071e2e5, which touches no fixture): member executed, task terminal, captain yielded and woke after idle were all true, whileexit0/productMarkerwere false purely because of the crashed teardown. Full trace in #154.On the documented alpha.5 flow the scenario passed 7 of 7 repeats both on the PR candidate and on a build from plain
426024f, so this reads as a structural teardown race rather than a behavioral regression: the loop flushes whateveragents.list()returns, without tolerating a session that retired mid-teardown.Change
The flush now skips exactly the retired-session failure ("not live in this store" — a retired session has nothing left to flush) and still propagates every other error, including a
session/flushcallback failure.Applied to the four fixtures that carry the identical idiom —
harness-runtime-idle.mjs,harness-runtime-resume.mjs,harness-runtime-entry.mjs,harness-runtime-web-approval.mjs— because the compatibility gate treats any scenario failure as fatal (verify.ymlassertsruns.every(run => run.passed)), so the same window can turn any of them red. The same loop also exists inharness-model-driver.mjs(model benchmark, not run by CI); left untouched to keep this scoped to the runtime fixtures.Honest limit of the guard: no assertion in these scenarios depends on the flush succeeding (they read team state and the trace), so it cannot mask a currently-asserted property — but the message is the only discriminator, so a genuine premature session retirement would be swallowed rather than surfaced. If you would rather have it stricter (e.g. re-check liveness through the store API instead of matching the message), say so and I will rework it; I avoided
sessions.getbecause the fixtures run against four host versions and I could not confirm that lookup exists in all of them.Verification
node --checkon all four fixtures.0.1.2-alpha.5(the version that flaked), patched fixtures: 9 runs — the seven scenarios (lifecycle,fallback,failure,captain-idle-wakeup,progressive-entry,web-approval,protocol-compatibility) plus the two cold-restore legs — allpassed: true, every run exit 0.result.jsonrecords the fixture hashes, which match this commit.Refs #154