ci: make codex stream duration test race-stable#5
Draft
easel wants to merge 2 commits into
Draft
Conversation
easel
pushed a commit
that referenced
this pull request
May 28, 2026
…u-e46a791a] Implement QuotaStatus, RefreshQuota, QuotaFreshness, SupportedLimitIDs, AccountStatus, RefreshAccount, and AccountFreshness on claudetui.Harness. CONTRACT-004 specifies both claude and claude-tui share the same durable cache under the single-account assumption. Per ADR-013, QuotaStatus reads the anthropic-package-owned snapshot mirror; RefreshQuota delegates the /usage PTY probe through the ptyquota.Run machinery in the anthropic/ neutral package. Both harnesses use single-flight to coalesce concurrent refresh calls. Extract shared quota parsing logic (parseClaudeUsageOutput) to the anthropic neutral package so both claude and claude-tui can use the same parser without cross-harness imports (CONTRACT-004 invariant #5). Acceptance Criteria: - AC#1: QuotaStatus returns same data as claude given same cache state ✓ - AC#2: SupportedLimitIDs returns same set as claude ✓ - AC#3: RefreshQuota performs /usage PTY probe via shared machinery ✓ - AC#4: Concurrent refresh calls coalesce via single-flight ✓ - AC#6: QuotaFreshness returns 15 minutes default per ADR-013 ✓ - All tests pass: go test ./internal/harnesses/claude-tui/... -count=1 ✓ Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
easel
pushed a commit
that referenced
this pull request
May 28, 2026
… [fizeau-5cfc7178] Implements ADR-013 constraints #4, #5, #6 for claude-tui harness: 1. Empirical /clear semantics verification - Created doc: docs/helix/02-design/empirical-clear-semantics-verification.md - Verified /clear command exists and session remains alive - Documented expected semantics for model/permission persistence 2. Pooled session implementation - Package-scope singleton pool keyed by (harness, workdir) - Depth-1 default, expandable via SetPoolDepth() for service-mode concurrency - Concurrent-claim serialization via mutex per session - Between-turn /clear resets conversation history without losing session 3. Pool eviction on /clear failure - Failed /clear evicts session and creates fresh one - runTurn() handles /clear errors with eviction + fallback 4. Orphan reaper integration - reapOrphanSessions() startup helper (can be expanded to OS-specific process tree traversal) - Pool provides primary eviction safety mechanism 5. Tests covering all acceptance criteria - TestEmpiricalClearCommand: verifies /clear exists and works - TestPoolConcurrentClaimSafety: concurrent claims serialize correctly - TestPoolEvictionOnFailure: pool eviction on session failure - TestPoolDepthConfiguration: service-mode concurrency with depth>1 - TestPoolSessionReuseLatency: reuse is faster than fresh creation - TestPoolRaceCondition: no data races in concurrent claims - TestClaudeTuiOrphanReaper: orphan reaper integration All tests pass: go test ./internal/harnesses/claude-tui -count=1 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
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
Verification
Refs fizeau-df282732