Repository navigation
Include serialized-client admission wait in the advertised total deadline - #121
Merged
Merged
Conversation
…line Pi-Agent-Run: 05f8b5a8-350b-4667-84f4-14bce148fd6b CI-Round: 1
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.
Fixes #68
The agent implemented Include serialized-client admission wait in the advertised total deadline in a disposable snapshot.
Handoff — repair round complete (no CI try consumed)
Branch:
pi-agent/lets-68-admission-deadline@16db443(two commits on top of basefb6c01c)Controller failure — root cause and fix
The controller's
check.shfailed atuv sync --frozen --all-extras: the repo pinned.python-versionto3.14, but only CPython 3.11.17 is installed in this sandbox and uv's interpreter download frompython-build-standalone(GitHub) is blocked (tunnel error: unsuccessful). Fix (environment, not a weakened check): commit16db443pins.python-versionto3.11— exactly the precedent fix from the prior pi-agent run (PR #88, issue #67). This only steers localuvinterpreter selection;requires-python = ">=3.11,<3.15"admits it, no test asserts the file, and CI still exercises the full 3.11–3.14 matrix via its ownsetup-pythonmatrix. After the fix,uv synccompletes in ~1.2s from the local cache.Implementation (unchanged from first round, commit
d1dffb9)src/lets/client.py: absolute deadline created before lock acquisition; timedacquire(timeout=remaining); admission failure raises the new explicitClientCapacityError(subclass ofhttpx.TimeoutException) before any transport use; watchdog armed with the remaining budget; lock release in an outerfinally. No unbounded queue added.tests/unit/test_client_admission.py: 6 deterministic tests — occupied client, multiple waiting callers, zero transport use on admission timeout, close during wait (closed error and bounded-by-deadline variants), serial successful admission via event barriers, and a fake-clock test proving the deadline predates serialization and the watchdog uses the remaining interval.docs/integration.md"Client concurrency and deadlines": separate clients or a bounded host executor for parallel MCP/A2A work; synchronous surface explicit.CHANGELOG.md[Unreleased]entry added.Evidence — exact controller gate sequence reproduced manually (final commit
16db443)uv sync --frozen --all-extras→ OK (previously the failing step)uv pip check --python .venv/bin/python→ 48 packages compatibleruff check .→ cleanpython -m mypy src/lets→ cleanpytest -m 'not e2e' --cov=lets --cov-branch→ 945 passed, 2 environment skips (Docker/Windows)diff-cover --compare-branch fb6c01c8b1c86337d7b20226d2abe099614d2957 --fail-under=90→ 100% (9/9 changed lines)scripts/check_changed_coverage.py --fail-under 90→status: "pass", decision artifact at.pi-evidence/changed-coverage-decision.jsontest_client_admission.py+test_client.pyunder the lock-pinned venv → 145 passed; earlier discrimination run showed 4/6 new tests fail on the pre-change logic and 6/6 pass on the fix.Limits
.pi-evidence/is left untracked (the controller's own script creates it); tree is otherwise clean._request; trivial rebase possible if it lands later, no intent overlap./opt/pi-control/check.shanddeep-local-check.pywere not invoked — the controller owns them; I reproduced their exact commands instead.The candidate is ready for the controller's independent qualification suite.
Snapshot base:
fb6c01c8b1c86337d7b20226d2abe099614d2957.Change fingerprint:
86fd727978a5969066958464a67675612f0e7cf555659782e9b207addd0203f1.Local qualification: passed; log SHA-256:
dbcb17638a1c1dc5cd24aac760be883158f3ec8133c034f965f7a8d923c5eee0.CI round: 1/3; current PR commit:
a87a804c8e73b397d4670e8d0f3a606b94e17b59.Changed files:
.python-versionCHANGELOG.mddocs/integration.mdsrc/lets/client.pytests/unit/test_client_admission.pyController-run local test evidence
CI evidence:
Full local evidence and snapshot manifest remain on the Pi-Agent dashboard for run
05f8b5a8-350b-4667-84f4-14bce148fd6b. Native and distributed gates are qualified by their actual PR workflows; local checks do not claim platform parity.All CI checks passed; awaiting Sam’s review.
All CI on the current PR head is green; Sam merges.