Skip to content

fix: bound timeouts and isolate memory errors (part 1/7) - #10744

Closed
bolichen97 wants to merge 1 commit into
mainfrom
feat/pr10521-01-recovery-policy
Closed

bolichen97 wants to merge 1 commit into
mainfrom
feat/pr10521-01-recovery-policy

Conversation

@bolichen97

@bolichen97 bolichen97 commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

The workflow timeout loader does not enforce its declared bounds. Shared memory-store startup/read failures can expose internal exception details. Several existing tests also depend on leaked CLI state, a particular home layout, cross-source RSS ordering, or process-global mocks, preventing reliable verification of those fixes.

Why it matters

Workflow execution must remain bounded, unavailable-memory responses must be useful without disclosing private paths or content, and tests must verify those contracts without modifying the operator's environment or mistaking unrelated process probes for termination calls.

What changed (motivation → approach → change)

  • Enforce the existing 60–21600-second workflow timeout range in src/kiro_crew/config/loader.py, with direct default, boundary, coercion and invalid-value regressions.
  • Return fixed, type-based guidance from the shared unavailable-memory helper in src/kiro_crew/dashboard/handlers/memory.py, never formatting the internal exception. Preserve the separate anonymous private-PUT response and redacted logging from feat: complete memory v2 lifecycle and private workflows #10586, along with embedding generation, fsync, progress and repair-status behavior. GET/PUT preparation tests pin the actual response boundary.
  • Use a shared CLI test fixture to restore inherited sandbox markers across real in-process entry points. Keep the real cold-SEL writer in its specific test, synthetic home boundaries, trusted-binary refusal and scanner reason-length contracts. Production sandbox, trust and audit policies are unchanged.
  • Correct test/metrics/test_process_gauges.py to verify that each real kernel probe's byte value reaches the SDK unchanged, rather than assuming an atomic cross-source peak/current ordering. Production RSS probes are unchanged.
  • Remove duplicate recycled-PID fake overrides and isolate subject syscall mocks in the pod/process tests; retain exact termination counts and the real broadcast guard. Background probes do not pollute the subject's call list.
  • Update the existing config, memory and metrics system specifications with these shipped contracts.

This is part 1 of the seven-part restructuring tracked by #10521. It does not activate a durable task queue, adaptive controller, new recovery settings or recovery services. Recovery APIs and their owning tests are delivered with their actual consumers in later parts, not as an unused standalone library here. The original intent comment remains an immutable record; individual review dispositions explain this scope subtraction.

Base: main at 7c6e6720b00142dbfbcbcdf39446b7306e25add4.
Candidate: 0b6a3b91c58849e3721d4df7e3e2f4fccdd006c5.
Complete incremental diff: 60,570 bytes across 35 files; one feature commit.

The retained fixes restore existing declared behavior. They do not claim a new product-shape RFC approval. Later default-changing layers retain their separate RFC prerequisite.

Tests

  • All 50 commands in the trusted base-ref prepare-PR profile completed with exit 0 on the exact candidate/base above; no timed-out, omitted or duplicate command. The parent independently verified the command list, explicit working-directory adaptations, frozen script/profile hashes and preserved environment.
  • Full backend: 105,944 passed, 356 skipped, 9 xfailed; 106,309 collected, 0 failed. Existing platform/optional-dependency skips are reported, not treated as executed tests.
  • The profile includes backend formatting/lint/type checks, repository safety/structure checks, frontend build/type/lint/tests, Electron tests, vendor integrity, documentation and bundle checks. The selected frontend run passed 7,062 tests across 242 files; Electron passed 1,896 tests with 1 existing skip.
  • Focused regression verification covers all six RSS/pod/process/app-build modules (544 passed, 8 existing skips), memory response boundaries, cold-SEL forward/reverse ordering, and CLI environment restoration. These focused results supplement, not replace, the full backend run.
  • Controlled negative tests detect incorrect RSS units, clamped/substituted probe values, shared syscall-mock pollution, an invalid target PID and duplicate fallback termination. Production behavior was restored before the final checks.
  • The candidate's whole PR diff is byte-identical to the fully checked local-review revision 305f123cda56fe8176ee951565efee0b898a4b0b. Both pinned local reviewers independently confirmed the current 0b6a3b91c58849e3721d4df7e3e2f4fccdd006c5 diff and unchanged base rules: no blocking findings. Opus reports no findings; GPT's one nonblocking import advisory is addressed below.

The GPT lane retains one nonblocking top-level-imports advisory for the narrow MemoryStartupUnavailable type import. The base rule explicitly has blocking: false. This is an acknowledged style tradeoff, not a claimed circular-import exemption or literal rule compliance; it does not justify another behavioral change to an already verified error boundary. The individual disposition records the evidence and remaining site.

The successful runs still report runtime/deprecation/thread warnings, report-only documentation/i18n debt, and temporary/cache observations. These are not presented as resolved or as executed cross-platform coverage; no check or threshold was relaxed.

Manual verification

Read the complete base-to-head diff, verified the private-writer and shared-preparation response paths separately, and checked that no production RSS or process-termination code was changed. Built the wheel with matching frontend assets and exercised the isolated Chromium/Electron setup.

No live gateway, real provider, production data home or machine-wide agent configuration was modified. Native Windows/macOS behavior is not inferred from Linux mocks; applicable remote platform CI remains required. Remote CI/review readiness for this new revision is pending. No new panel, layout, interaction or visual styling is introduced.

Related Issues

Part of PR #10521. This existing PR remains the first layer; no replacement PR is being opened.

Dependencies: none; this layer targets main. The remaining six PRs will be published with their direct predecessor branches as bases and kept draft until their own readiness conditions are met. Publishing the stack is not a claim that every layer has full main-base CI or an approved product-shape RFC.

Coordination: preserve the agent-home scope of PR #9714; the memory lifecycle work in PR #10586 is already in this base and is not reimplemented here. Later layers separately coordinate lifecycle and terminal/outbox interfaces.

Pattern harvest

Rule candidate: review-prompt / lint.

Pattern: a documented numeric bound omitted at its loader call; a public error response interpolating an internal exception; a test patching a shared module attribute when it needs a subject-local spy; duplicate test monkeypatches silently replacing a parameterized premise.

Test-design pattern: comparisons between independently sampled platform counters need a documented common accounting/snapshot contract. Preserve and verify actual probe values instead of fabricating an ordering with allocator churn or clamping.

No new repository rule, production guard or gate threshold is introduced by this PR.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; nonblocking style advice is explicitly disclosed
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and patrigao September 14, 2026 08:15
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 14, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Intent: Supply bounded recovery policy and episode-tracking primitives, with tests and owning documentation, as Part 1 of the dependency-ordered replacement for #10521. Preserve existing runtime behavior while enforcing the already-declared workflow timeout bound and keeping memory failures and test fixtures safe.
Not a goal: Activate the durable task queue, adaptive controller, live recovery consumers, or new recovery settings; implement the remaining six slices; replace the broader ownership or memory-lifecycle work in #9714 or #10586; bypass any review or merge requirement.

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 0b6a3b91c58849e3721d4df7e3e2f4fccdd006c5 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Verify no dashboard aggregator or alert relied on the cross-source peak >= current RSS ordering that metrics.md now explicitly disclaims.

Suggestions

  • cli_test_helpers.cli_sandbox_environment only protects modules that remember to import it, and the meta-test audits a fixed producer list; a conftest-level autouse fixture (two env keys, negligible cost) would close the forget-to-import failure mode for future CLI test modules.

[DESIGN-REVIEWED] 0b6a3b9

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🔴 BLOCK

Premise-level review of 0b6a3b91c58849e3721d4df7e3e2f4fccdd006c5 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: BLOCK

The loader clamp fixes a defect that does not exist: clamp_run_timeout already bounds every consumer of workflow_run_timeout_secs, so this ships a second spelling of the same ceiling.

Not justified as shipped

  • Item 1 — duplicate of src/kiro_crew/workflows/runner.py:123: "The workflow timeout loader does not enforce its declared bounds" — but base docs/system-specs/modules/workflows.md:1221 declares the bound enforced "by clamp_run_timeout", and it is.
    Subtraction: revert loader.py:2605 to _safe_int(..., 3600); delete test/test_config_overload_keys.py and the new config.md "Workflow run timeout bounds" section.
    Clears when: the deletion is made, or a consumer of the raw config value that bypasses clamp_run_timeout is named.
  • Item 3 — inherited: the deleted pin said "the invariant must hold" after a dwarfing spike; no linked flaky run or CI failure shows it ever broke — the kernel-accounting counterargument exists only in this PR's prose.
    Clears when: a linked run of the old test failing with current > peak.
  • Item 5 — oversized: 12 subprocess pytest runs (6 entry states × 2 orders, 120s timeout each) to verify a two-key env-restore fixture already covered by the in-process undo test.
    Subtraction: shrink test_real_cli_producers_restore_entry_environment to one entry state, one order.
    Clears when: the matrix is shrunk, or a flake is named that a specific deleted arm caught.

What this change ships

Inventory (10 items) — 7 justified

Intent: bound the workflow-run ceiling at config load and stop memory-store 503s from leaking internal exception text, with test-isolation repairs — a FIX.

  1. Out-of-range workflow_run_timeout_secs values now load clamped to 60..21600 — duplicate of workflows/runner.py::clamp_run_timeout (2 consumers counted via grep workflow_run_timeout_secs: server.py:2716, service.py:254; both already clamp at service.py:251/312)
  2. Memory-store 503s give fixed, type-based guidance and never format internal exception text — justified
  3. The peak-RSS ≥ current-RSS test invariant is deleted; metrics doc now disclaims cross-source ordering — inherited (defect asserted only in the description, no linked failure)
  4. CLI tests restore inherited sandbox env markers via a shared fixture across 17 modules — justified
  5. A 12-subprocess matrix test verifies that fixture's teardown — oversized
  6. Process-kill tests use private syscall bindings instead of patching global os.kill — justified
  7. Pod stop tests drop duplicate pid_exists overrides that silently erased the recycled-PID premise — justified
  8. Agent-home tests capture SEL audit locally and assert allow/deny outcomes — justified
  9. Project-scan warning tests bound the reason text, not the whole path-bearing message — justified
  10. Trusted-bin tests model a separate HOME and pin refusal of a read-only target inside real HOME — justified

Blockers

  • Duplicate bound: the loader clamp of workflow_run_timeout_secs re-implements clamp_run_timeout. The description claims "The workflow timeout loader does not enforce its declared bounds", yet the base declaration (workflows.md:1221) names clamp_run_timeout as the enforcer, and grep for workflow_run_timeout_secs finds exactly 2 consumers — dashboard/server.py:2716 (→ constructor clamp, service.py:251) and the live binding (service.py:254 → set_timeout_secs clamp, service.py:312) — so the zero option changes nothing observable at runtime. The clamp also duplicates the literals 60/21600 beside MIN_RUN_TIMEOUT_SECS/MAX_RUN_TIMEOUT_SECS, two spellings that will diverge. Subtraction: revert loader.py:2605, delete test/test_config_overload_keys.py and the config.md section.
    Clears when: the loader clamp, its test file and its config.md section are removed, or a raw-config consumer bypassing clamp_run_timeout is named.

[FIRST-PRINCIPLES-REVIEWED] 0b6a3b9

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 0b6a3b91c58849e3721d4df7e3e2f4fccdd006c5 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 0b6a3b9

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 0b6a3b91c58849e3721d4df7e3e2f4fccdd006c5: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 14, 2026
@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 0b6a3b91c58849e3721d4df7e3e2f4fccdd006c5 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 0b6a3b9

Verdict parsed from the review's SHA-scoped output markers for commit 0b6a3b91c58849e3721d4df7e3e2f4fccdd006c5.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 0b6a3b91c58849e3721d4df7e3e2f4fccdd006c5: <one-sentence reason>

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 14, 2026
@bolichen97 bolichen97 changed the title feat(recovery): add bounded policy primitives (part 1/7) fix: bound timeouts and isolate memory errors (part 1/7) Sep 15, 2026
@bolichen97
bolichen97 force-pushed the feat/pr10521-01-recovery-policy branch from c257255 to 0b6a3b9 Compare September 15, 2026 00:46
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Sep 15, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Remove speculative recovery and metric surface from Part 1 — span=ffb6b65d7416

Disposition: fixed.
Published 0b6a3b9 removes the unconsumed recovery package, histogram facade, future instrument declarations and exclusive speculative specifications from this PR. This removes the zero-consumer API addition rather than asserting that a future RFC is already approved.
The seven-part plan in #10521 retains recovery and metrics with their actual consuming layers. Those layers still require their own implementation, tests and any applicable RFC decision; their readiness is not certified here.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Separate the live fixes from the recovery library revert — span=d43315b0556b

Disposition: fixed.
Published 0b6a3b9 retains the declared workflow-timeout clamp, privacy-preserving memory guidance and their test hygiene, but contains no recovery library. A future recovery-library revert therefore does not require reverting these two live fixes.
The two existing-contract fixes remain in Part 1, whose complete body now describes the actual 35-file snapshot. This is separation from the library, not a claim that the two fixes have become two PRs or that anyone accepted the old coupled revert cost.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Move the prose classifier with its real consumers — span=fd70aa76e5fa

Disposition: fixed.
Published 0b6a3b9 removes the classifier and its prose markers with the unconsumed recovery package. Part 1 no longer introduces the producer-wording dependency identified by this suggestion.
This does not claim that removing the code fixes producer-contract robustness in a later layer. The consuming layer must preserve structured success/failure authority and pin the real producer/error contracts before its own acceptance.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Remove the zero-consumer recovery package — span=62d0cbc182fa

Disposition: fixed.
Published 0b6a3b9 does not contain the recovery package or add its exclusive tests/spec claims. The policy, tracker, ladder and classifier are not landing as a standalone promise of future consumption.
The subsequent consuming layers in #10521 retain their own code/test/spec responsibilities. Removing this addition is not a claim that a production consumer or approved RFC has already landed.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Remove unconsumed future instrument declarations — span=19d031d47a54

Disposition: fixed.
Published 0b6a3b9 leaves metrics/events.py byte-identical to the main base, so this PR adds none of the future TASKQ/HOST/loop/adaptive declarations identified by the review.
Each instrument remains assigned to the layer containing its real emitter; declaration-only tests do not establish consumption. The existing RSS test correction verifies unchanged production probe values and is not a new instrument declaration.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Remove the histogram facade with the unconsumed ladder — span=f54b660b3502

Disposition: fixed.
Published 0b6a3b9 removes the proposed emit_histogram facade with its unconsumed ladder caller. metrics/events.py is identical to the main base, preserving its existing counter/event behavior.
Any later histogram facade must be justified by an actual emitting consumer and its forwarding/no-raise regressions; Part 1 does not claim that later integration is complete.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Move the nofile reader to HostBudget — span=b0efbe353a44

Disposition: fixed.
Published 0b6a3b9 leaves platform_compat.py byte-identical to its main base. The newly proposed nofile_soft_limit reader and its exclusive test/spec additions are not in this PR; the existing raise_nofile_soft_limit behavior is retained.
The HostBudget consumer layer must carry the POSIX, Windows, unavailable and infinite-limit behavior and real sizing tests. No HostBudget integration is claimed here.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Remove the unused FixedRng fake — span=a61cea67002c

Disposition: fixed.
Published 0b6a3b9 contains no test/overload_fakes.py or unused FixedRng definition. The complete backend suite passes without dangling imports of that removed helper.
Recovery-test helpers travel with the consuming tests, and an unused fake is not restored merely for symmetry. This removes no required product behavior.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Remove Part 1's reliance on an unapproved future design — span=5700ef84af9b

Disposition: fixed.
Published 0b6a3b9 stands on existing timeout and memory-privacy contracts, not on unconsumed recovery, metrics or nofile APIs. The proposed future-design-dependent additions have been removed.
No RFC approval is asserted or manufactured. Later default-changing layers remain subject to an approved non-draft RFC on main or the repository's explicit maintainer decision path.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Remove the added backoff instead of claiming consolidation — span=cf3aedec774c

Disposition: fixed.
Published 0b6a3b9 adds no recovery library and therefore no fifth backoff implementation. This addresses the incremental duplication by removing the addition, not by widening Part 1 into unrelated retry migrations.
No existing retry path is claimed migrated. The later consumer layer must demonstrate its actual call path and address consolidation on its own evidence; the original migration condition is not represented as completed here.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Apply the consumer-first subtraction — span=bb914fec7e81

Disposition: fixed.
Published 0b6a3b9 applies the proposed subtraction: recovery, future metric declarations and the nofile reader are absent from the increment while the actual timeout/privacy fixes remain.
The seven-part plan preserves code, effective tests and specifications with their first consuming layers. The final Part 1 diff has been reconciled; this is not a certification that the remaining six layers are published or green.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Delete FixedRng without leaving unused helper scaffolding — span=912e56fd7fe9

Disposition: fixed.
Published 0b6a3b9 removes the exclusive overload helper module rather than leaving an unused FixedRng or Clock scaffold after relocating recovery tests. The full backend suite has no dangling import failures.
A later layer restores only the helpers its real tests consume. Removing an unused fake is not a reduction of the required behavior or a claim about later-layer readiness.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Remove the faulty table API from Part 1 — span=f092afe82579

Disposition: fixed.
The custom-policy table KeyError on the judged head is real. Published 0b6a3b9 removes the entire unconsumed recovery API from Part 1; recovery/ladder.py is absent at the published head. The defective operation therefore cannot be called in this revision.
This is removal of the faulty API, not a waiver of its defect or a rewrite of the old security-class verdict. Part 2 must deliver policy-owned iteration and custom/empty/subset/default-policy regressions with real consumers. Fresh remote review of the new head remains required; no override is requested.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Retain the narrow memory type import; remove obsolete import sites — span=8c371fabfae7

Disposition: rebutted.
Published 0b6a3b9 removes the recovery and histogram import sites. The shared memory response helper retains its narrow function-local MemoryStartupUnavailable type import. The base top-level-imports rule explicitly has blocking:false, and the current pinned local review retains this as one advisory, with no blocking consequence.
This is an acknowledged proportionality/style tradeoff, not literal rule compliance or a claimed circular-import exemption. The privacy response, typed guidance and import regressions remain tested; no runtime defect or security finding is being dismissed by this style disposition.
Verification: published diff 60,570 bytes/35 files; 50 local gates passed; full backend 105,944 passed, 356 skipped, 9 xfailed; both current-SHA local reviews have no blockers. Remote readiness remains pending.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 15, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Keep the RSS regression repair: the original test did fail — span=cd612da936ac

Disposition: rebutted. This was not a theory-only deletion. The preserved full local gate at ca32ed24f078f512d8af6dc3c6d774bdf4cc88ee (base 46034d9) failed the unchanged test_peak_rss_at_least_current_rss after its original 32 MiB allocation/touch/del/gc sequence: peak=1838776320 bytes, current=1843671040 bytes. The original log SHA-256 is 9810ec3f782f440043e8e7137fc524f729ffa7a9d40e08f80e3751fcac56fcc8. This is local gate evidence, not a fabricated GitHub Actions run.
Independent controlled workers also failed the unchanged test on both base and L1, without modifying returned probe values: base peak=182554624/current=185040896; L1 peak=182214656/current=184369152. Their allocator conditions establish valid counterexamples, not the allocation history of the original full-suite worker.
The production probes were byte-identical between base, original L1 and repair. The replacement test checks that each real probe's bytes reach the real SDK unchanged; it detects wrong units, clamping and substituted sources via three failing negative controls. Restoring the disproven cross-source ordering would restore a false test contract, not strengthen production behavior.

Original full-gate excerpt (ANSI formatting and machine paths omitted; values and assertion unchanged):

______________________ test_peak_rss_at_least_current_rss ______________________
    spike = bytearray(32 * 1024 * 1024)
    for i in range(0, len(spike), 4096):
        spike[i] = 1
    del spike
    gc.collect()
    metrics = _collect()
    (cur,) = metrics[pg.GAUGE_RSS]
    (peak,) = metrics[pg.GAUGE_PEAK_RSS]
>   assert peak.value >= cur.value
E   assert 1838776320 >= 1843671040
test/metrics/test_process_gauges.py:209: AssertionError

This comment makes the previously local evidence reviewable. The main-base code paths use independently sampled kernel accounting sources; a shared SDK timestamp is not an atomic kernel snapshot. The fixed tests and unchanged production probes passed the complete 50-command local gate on the current head.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Keep CLI fixture ownership explicit in the affected modules — span=18e2e42067db

Disposition: rebutted as disproportionate to this repair. The fixture restores the two entry markers for demonstrated in-process CLI producers; those affected modules explicitly import it. Making it conftest-global would extend environment restoration to unrelated tests instead of keeping the owner visible at the CLI test boundary.
I acknowledge the remaining manual opt-in requirement: the fixed producer list does not prove that a future new module will import the fixture. No automatic future-module guarantee is claimed. The actual producer/teardown regressions, including the missed port entry point and early monkeypatch.undo, remain covered; the separate expensive-matrix suggestion is being addressed without changing shared conftest or production sandbox behavior.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 15, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) September 15, 2026 21:45
@NicholasRBowers NicholasRBowers added the needs-pr-triage PR scanner: awaiting automated triage label Sep 19, 2026
@chenmingwei23 chenmingwei23 added needs-author-decision PR blocked on author input and removed needs-pr-triage PR scanner: awaiting automated triage labels Sep 19, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor

🤖 Kiro Crew [operator: chenmingwei23#de330d0c]: This PR has been inactive for 7+ days. I reviewed the blockers but they require your input:

  • Decide whether workflow_run_timeout_secs must be bounded during config loading, or only by the existing runtime clamp. The current First Principles blocker says the new loader clamp duplicates the existing contract.
  • Decide whether the wide CLI environment test matrix belongs in this PR. The blocker calls it oversized; narrowing it changes the evidence this PR keeps.
  • Resolve the current main conflict after those decisions. The coverage failures are downstream of cancelled backend jobs.

When you've addressed these, the pipeline will re-assess on its next cycle.

@bolichen97

Copy link
Copy Markdown
Contributor Author

由所有者决定关闭。分支与提交保留,后续如需可另行处理。

@bolichen97 bolichen97 closed this Sep 20, 2026
auto-merge was automatically disabled September 20, 2026 18:28

Pull request was closed

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Branch has merge conflicts with its base — author must resolve before merge needs-author-decision PR blocked on author input

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants