Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .traceweaver/intent-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,30 @@
"trace_id": "TRACE-PAIR-006",
"verification_id": "VER-PAIR-006",
"validation_id": "VAL-PAIR-006"
},
{
"id": "REQ-UPDATER-001",
"statement": "Bounded stop-only acknowledgement headroom; preserve existing stop grace (13s default), other socket timeouts and readiness deadlines.",
"authority_status": "owner_approved_scope",
"trace_id": "TRACE-UPDATER-001",
"verification_id": "VER-UPDATER-001",
"validation_id": "VAL-UPDATER-001"
},
{
"id": "REQ-UPDATER-002",
"statement": "Fixed allowlisted phase/category diagnostics, safe known wrapped-cause classification, separate primary/recovery failure; no exception text/payload/credentials/traceback serialization; diagnostics cannot interrupt recovery. Preserve rollback, identity, selection and native guards.",
"authority_status": "owner_approved_scope",
"trace_id": "TRACE-UPDATER-002",
"verification_id": "VER-UPDATER-002",
"validation_id": "VAL-UPDATER-002"
},
{
"id": "REQ-UPDATER-003",
"statement": "Recognize one explicitly named released-standard1.5.4 source via complete ordered structural equality and immutable eight-template historical closure; preserve current candidate rendering, auth/module identity, selection/source drift denial, declaration and recovery guards. Verify matching official wheel/container and disposable staging adoption before bounded separate official hostvenv provisioning, fixed native Proxy adoption and the already-approved single LTX IPMI retry.",
"authority_status": "owner_approved_scope",
"trace_id": "TRACE-UPDATER-003",
"verification_id": "VER-UPDATER-003",
"validation_id": "VAL-UPDATER-003"
}
],
"service_recovery_amendment_projection": {
Expand Down Expand Up @@ -105,5 +129,15 @@
"acceptance": "Local candidate only; final independent review, protected CI/native/installed browser/site acceptance held",
"prior_recovery_budget_reset": false,
"new_native_budget": 0
},
"updater_stop_scope": {
"authority": ".traceweaver/updater-stop-20261104/authority.json",
"profile": ".traceweaver/updater-stop-20261104/workflow-profile.json",
"status": "owner_approved_scope; implementation verification pending; runtime held"
},
"updater_compatibility_scope": {
"authority": ".traceweaver/updater-stop-20261104/compatibility/authority.json",
"profile_revision": 3,
"status": "owner-approvedscope; REDdefinitionphase; runtimeheld"
}
}
15 changes: 15 additions & 0 deletions .traceweaver/updater-stop-20261104/approved-plan-review.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html><html lang="en"><meta charset="utf-8"><title>LTX updater repair plan review</title><body>
<h1>LTX updater repair: approval-ready amendments</h1>
<p>2026-11-04. Read-only source review; requested Astra high identity is unattested. No implementation, Git mutation, remote operation, release or retry performed. Review scope: frozen installed migration.py and updates.py, incident diagnosis, existing test_updates.py test inventory.</p>
<section id="CHANGED"><h2>CHANGED</h2><p>Only this review and its evidence manifest were created. Proposed scope is appropriate with the amendments below; implementation and production execution remain subject to owner approval for the Proxy component.</p></section>
<section id="VERIFIED"><h2>VERIFIED</h2><p>Frozen DockerEngine uses a 15-second transport timeout and computes stop grace as timeout minus two (13 seconds). Raising the global timeout would also raise grace, preserving the inadequate two-second allowance. The request wrapper converts OSError into MigrationError with the original exception as its cause. replace_container discards all non-UpdateError details. It marks started_stop before calling stop, so stop failures already enter automatic recovery. Disconnect happens immediately after stop, before rename. Result dictionaries are persisted by the worker.</p><p>Diagnosis records SIGTERM to stop event duration 15.110771697 seconds, forced kill after approximately 13 seconds, no candidate rename/create/start, and original restart. These are retained incident evidence, not a new independent observation of live health or data counts.</p></section>
<section id="CLAIMED"><h2>CLAIMED</h2><p>A stop socket timeout is strongly supported, not established: the exception was lost, and a following disconnect failure remains possible. The repair addresses a demonstrably inadequate timeout relationship but cannot claim to have proved the historical exception or eliminated every cause.</p><ol>
<li>Keep the production stop grace at 13 seconds; introduce a stop-specific transport budget with explicit bounded acknowledgement headroom, e.g. 13 + 15 = 28 seconds. Pass this only to that request. Preserve other request timeouts and readiness deadlines. Do not mutate a shared engine timeout or extend grace when adding response headroom. Define behavior for existing nondefault timeout callers before coding.</li>
<li>Record an allowlisted operation phase set immediately before each fallible mutation (including stop and disconnect), and a bounded allowlisted exception category. Merely recording type(error).__name__ yields MigrationError for socket failures; classify its known cause, such as TimeoutError, without serializing text, paths, payloads, arguments or tracebacks. Unknown classes map to a fixed generic category.</li>
<li>Freeze the primary failure phase/category before recovery starts. If recovery fails, preserve those primary diagnostics and separately record a recovery phase/category; retain current failed/rolled_back/recovery_required semantics. Diagnostic construction must not throw or interrupt recovery. Keep identity, policy and native recovery guards intact.</li>
<li>Reuse existing replacement and recovery tests. Add the smallest cases proving stop timeout classification through MigrationError.__cause__, distinction from disconnect failure, secret-bearing exception text exclusion, and retention of primary failure when recovery fails. Verify added fields survive actual worker job persistence.</li>
<li>Use a real local Unix-socket HTTP boundary for representative delayed acknowledgement: original default request times out before a response at more than 15 seconds; revised stop succeeds with the same 13-second grace; a request exceeding the new bounded budget still fails and enters recovery. A shortened timing version may serve regression CI, but preserve one representative full-scale proof. Include a disposable Docker staging update/recovery against the frozen repair image to exercise daemon behavior, image identity and health recovery. No production retry to obtain missing diagnostics.</li>
</ol></section>
<section id="BLOCKED"><h2>BLOCKED</h2><p>No fix or tests have been implemented or run in this review. A mocked successful stop cannot prove the socket deadline repair. Representative delayed-ack proof and staging recovery evidence are needed before any production retry. This review does not authorize a new Proxy release or assert that a fixed route currently supports that release.</p></section>
<section id="PROMOTE"><h2>PROMOTE</h2><p>Recommend approval of the bounded Proxy repair plan with these amendments: isolated feature worktree, minimal production edits in migration.py and updates.py plus existing relevant tests; feature PR into dev and protected patch release into main, required checks retained, no CI/pool changes. Promote only the independently reviewed immutable release via an already authorized fixed update route. After Proxy update health and installed updater identity are verified, permit at most the separately approved single scoped LTX IPMI retry, retaining the prior backup waiver only within its original scope. Report release, deployment and retry acceptance separately.</p></section>
</body></html>
1 change: 1 addition & 0 deletions .traceweaver/updater-stop-20261104/approved-plan.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><meta charset="utf-8"><title>Proposed LTX updater stop repair</title><h1>Proposed updater repair and LTX retry</h1><p>Status: owner approval pending. This adds the CryptoLabs Proxy updater to the approved IPMI deployment scope. No repair code or new deployment has been executed.</p><p>Incident658b5cc178cf40989335b6f51b5eb876: original IPMI stop took15.1108s against15s socket timeout and13s stop grace. The original was restored;802eventrows and6alert-history rows are unchanged. No candidate create/start occurred. Timeout is strongly supported, but exact exception was discarded and a following disconnect failure is not excluded.</p><ol><li>In an isolated hotfix worktree, update src/cryptolabs_proxy/migration.py with bounded stop-only acknowledgement headroom while preserving existing stop grace (13s default), other socket timeouts and readiness deadlines. Update src/cryptolabs_proxy/updates.py with fixed allowlisted phase/category diagnostics, safe known wrapped-cause classification, and separate primary/recovery failures. Never serialize exception text, payloads, credentials or tracebacks; diagnostics cannot interrupt recovery. Preserve rollback, identity, selection and native guards.</li><li>Reuse tests/test_updates.py and tests/test_proxy_lifecycle_review_repairs.py, extending only meaningful missing cases: real Unix-socket delayed stop acknowledgement beyond the old deadline, bounded timeout failure, safe diagnostics through MigrationError cause, and original failure preservation on rollback failure. Retain original readiness/recovery/security tests. Run representative full-duration stop/ack and disposable Docker staging update/recovery proof before production; no production retry to collect lost logs. No dependency, CI, runner, pool or unrelated service changes.</li><li>Use protected review/CI and a patch release based on the released main baseline, carrying only this reviewed repair and its release metadata (pyproject.toml and package __init__.py). Current Proxy main8e2b421 is1.6.0; dev2f868959 contains substantial unreleased Fleet owner changes. Preserve those changes and exclude them from this hotfix release; use a scoped source-to-dev handoff plus a main-based bounded release PR as required, rather than promoting the whole dev tree. Source and release authority/trace receipts accompany the patch. Owner approval covers this bounded hotfix route, not the separate unpublished Fleet proof or its budgets.</li><li>After independent validation and immutable image publication, use the approved installed fixed host route to update only LTX Proxy. Verify its health, auth, unrelated pins and installed updater identity. Then permit one scoped IPMI1.4.0 retry, validate exact digest, saved history, collection and warning UI. No duplicate or blind retry, no manual container replacement or guard bypass. Charlotte remains untouched. Existing LTX backup waiver and explicit SSH-key instruction remain in force; BMC mutation policies stay off/unqualified.</li></ol><p>Risk/trade-off: a stop call receives a larger but bounded response budget; no longer grace period or global deadline expansion. Proxy itself must be upgraded before IPMI retry, so this changes a second product component. Any unexpected failure holds rollout with verified original recovery. Astra review: findings/astra-ltx-updater-plan.html. User AGENTS.md requires explicit approval when implementation scope changes.</p>
42 changes: 42 additions & 0 deletions .traceweaver/updater-stop-20261104/authority.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"schema": "updater-stop-authority/1",
"work_item_id": "UPDATER-STOP-20261104",
"source_revision": "8e2b421b65f6d8d47f780e5681d0f3d690686a6d",
"owner_approval": ".traceweaver/updater-stop-20261104/owner-approval.json",
"approved_plan_sha256": "5c48796eff976c9e614887931087494687d3626f5780d4db0acf28b7f2299342",
"plan_review": ".traceweaver/updater-stop-20261104/approved-plan-review.html",
"meaning": "Existing owner approval is authority; local IDs only label its unchanged two implementation control groups. Root pairing authority remains untouched.",
"implementation_scope": [
"src/cryptolabs_proxy/migration.py",
"src/cryptolabs_proxy/updates.py",
"tests/test_updates.py",
"tests/test_proxy_lifecycle_review_repairs.py"
],
"current_phase": "Implementation allowed for original two production files under owner approval and root precode review; compatibility addendum excluded pending owner approval.",
"excluded": [
"CI/dependency/runner changes",
"BMC qualification or mutation",
"Charlotte",
"unreleased Fleet dev",
"publication or remote mutation by this worker"
],
"controls": [
{
"id": "REQ-UPDATER-001",
"trace_id": "TRACE-UPDATER-001",
"ver_id": "VER-UPDATER-001",
"val_id": "VAL-UPDATER-001",
"source": "approved-plan.html clause 1; approved-plan-review.html amendment 1/5",
"text": "Bounded stop-only acknowledgement headroom; preserve existing stop grace (13s default), other socket timeouts and readiness deadlines."
},
{
"id": "REQ-UPDATER-002",
"trace_id": "TRACE-UPDATER-002",
"ver_id": "VER-UPDATER-002",
"val_id": "VAL-UPDATER-002",
"source": "approved-plan.html clause 1; approved-plan-review.html amendments 2/3/4",
"text": "Fixed allowlisted phase/category diagnostics, safe known wrapped-cause classification, separate primary/recovery failure; no exception text/payload/credentials/traceback serialization; diagnostics cannot interrupt recovery. Preserve rollback, identity, selection and native guards."
}
],
"id_status": "Scoped indexing of approved clauses; orchestrator must verify mapping, not a new requirement approval."
}
13 changes: 13 additions & 0 deletions .traceweaver/updater-stop-20261104/baseline.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.............................................. [100%]
=============================== warnings summary ===============================
tests/test_proxy_lifecycle_review_repairs.py: 21 warnings
/Users/hanneszietsman/CrypotAI/cryptolabs-proxy-updater-stop-20261104/tests/../src/cryptolabs_proxy/auth.py:374: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
'created_at': datetime.utcnow().isoformat(),

tests/test_proxy_lifecycle_review_repairs.py::test_adoption_real_initializer_preserves_current_customer_password
tests/test_proxy_lifecycle_review_repairs.py::test_initializer_fresh_install_bootstraps_and_restart_preserves
/Users/hanneszietsman/CrypotAI/cryptolabs-proxy-updater-stop-20261104/tests/../src/cryptolabs_proxy/auth.py:471: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
users[username]['last_login'] = datetime.utcnow().isoformat()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
46 passed, 23 warnings in 4.10s
20 changes: 20 additions & 0 deletions .traceweaver/updater-stop-20261104/builder-result.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"phase": "implementation and local verification returned for review",
"frozen_manifest": "/Users/hanneszietsman/CrypotAI/artifacts/ipmi-sel-release-20261104/artifacts/updater-builder/frozen-manifest.json",
"production_source_hashes": {
"src/cryptolabs_proxy/migration.py": "60ab6493757352c135cbb8b389dd198eab66b9b996398430bfa668b8599d9cc3",
"src/cryptolabs_proxy/updates.py": "1b176672c2a55499ca70a9eeb445550849975463846abb068443715e14bf1b56"
},
"requirements": [
"REQ-UPDATER-001",
"REQ-UPDATER-002"
],
"verifications": [
"VER-UPDATER-001",
"VER-UPDATER-002"
],
"validation_status": "held pending independent Docker/Linux and intended environment proof",
"source_anchor_helper": "8 successful paired source/matrix transactions; scoped scanner0findings",
"profile_hash": "sha256:aaa66c2aad99a1e23e58e7112872f82b918eb1534edd68b102022a0c7f05d2eb",
"publication": "not performed"
}
5 changes: 5 additions & 0 deletions .traceweaver/updater-stop-20261104/capsule-reviewed.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
vv_capsule_status=blocked
vv_capsule_capsule=.traceweaver/updater-stop-20261104/vv-capsule.json
vv_capsule_findings=2
vv_capsule_finding=VV-CAPSULE-REVIEW-NOT-PASSED req_id=REQ-UPDATER-001 evidence=req_id="REQ-UPDATER-001" index=0
vv_capsule_finding=VV-CAPSULE-REVIEW-NOT-PASSED req_id=REQ-UPDATER-002 evidence=req_id="REQ-UPDATER-002" index=1
3 changes: 3 additions & 0 deletions .traceweaver/updater-stop-20261104/capsule-structure.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vv_capsule_status=pass
vv_capsule_capsule=.traceweaver/updater-stop-20261104/vv-capsule.json
vv_capsule_findings=0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><meta charset="utf-8"><title>Updater deployment compatibility addendum</title><h1>Proposed bounded compatibility addition</h1><p>Status: approval pending. Revision2 clarifies the host-package installation mechanism after installed-command discovery. Original stop-response/diagnostics repair remains approved. One LTX IPMI retry remains authorized only after repaired Proxy acceptance; it has not been consumed.</p><p>Verified blocker: the installed1.5.4 host owner rejects the1.6 candidate auth module. The official1.6 host wheel matches candidateauth but rejects LTX current1.5.4 Nginx configuration. Exact historical render equals live configuration SHAaaaad066a3bb3ac324824dd532fdf33859551217abd104c9c5664c75e0103aad; actual published wheel rejection reproduced offline. No host change was attempted.</p><ol><li>Add one named released-standard-1.5.4 full-tree profile in src/cryptolabs_proxy/standard_adoption.py. Package its immutable root template and seven includes plus provenance under templates/released-standard-1.5.4/. Render historical includes only within that closure and verify hashes. Recognize only the exact declared complete structural profile; preserve current candidate rendering and all auth, drift, image, selection and recovery guards.</li><li>Extend existing tests/test_standard_adoption.py with historical RED/GREEN, current candidate unchanged/account-link route retained, and focused historical variants of existing unknown-directive/upstream/auth/extra-route/order denial cases. Verify auth mismatch and source/selection drift still refuse before stop. Reuse existing recovery tests. Frozen synthetic historical fixture/declaration only if needed. No dependencies, CI or infrastructure changes.</li><li>Include this compatibility addition with the approved stop repair in the same independently reviewed protected patch release; exclude all unrelated unreleased Fleet dev work. Verify official wheel/container source identities and packaged historical resources. Prove actual adoption, auth/state preservation and compensated recovery with disposable staging before production.</li><li>Provision a new, separate versioned host CLI virtual environment using installed Python/venv/pip and the exact official wheel verified against published SHA256SUMS. The host has no fixed application wheel-installer; this is an explicit bounded provisioning exception requested for this operation. Do not upload or execute checked-out installers/scripts, change global CLI symlinks or alter the existing environment. Freeze exact package URLs/hashes and dependency inputs before installation; retain the old environment and original declaration/recovery snapshots. Run the official new package entrypoint for the native plan/adopt operation. Use a fresh native plan and installed fixed configuration adopt operation for LTX Proxy only. Verify browser auth, health, repaired updater bytes, unrelated pins and services, then execute the already approved ONE scoped IPMI1.4 retry. No second site, bypass or direct host source patch.</li></ol><p>Risk/trade-off: adds one formerly rejected historical source profile, so strict negative configuration cases and immutable template closure are mandatory. Adds one production module and historical resources beyond the two files in the original approval. Existing backup waiver and scoped SSH-key authority continue. BMC policies remain off/unqualified.</p><p>Astra review: <a href="findings/astra-updater-route-prerequisite.html">reviewed prerequisite</a>. Raw discovery: <a href="findings/updater-proxy-host-route.html">verified host route</a>. AGENTS.md requires explicit approval when implementation scope changes.</p>
Loading
Loading