diff --git a/.traceweaver/intent-contract.yml b/.traceweaver/intent-contract.yml index 1a3d23e..2a28fcf 100644 --- a/.traceweaver/intent-contract.yml +++ b/.traceweaver/intent-contract.yml @@ -81,6 +81,14 @@ "trace_id": "TRACE-UPDATER-003", "verification_id": "VER-UPDATER-003", "validation_id": "VAL-UPDATER-003" + }, + { + "id": "REQ-UPGRADEBUTTON-001", + "statement": "Complete selected-service upgrade control repair through CI, LTX deployment and observed updated IPMI/button verification; retain native policy and ownership guards.", + "authority_status": "explicit_owner_request", + "trace_id": "TRACE-UPGRADEBUTTON-001", + "verification_id": "VER-UPGRADEBUTTON-001", + "validation_id": "VAL-UPGRADEBUTTON-001" } ], "updater_stop_scope": { @@ -92,5 +100,9 @@ "authority": ".traceweaver/updater-stop-20261104/compatibility/authority.json", "profile_revision": 3, "status": "owner-approvedscope; REDdefinitionphase; runtimeheld" + }, + "upgrade_button_scope": { + "authority": ".traceweaver/upgrade-button-20261104/authority.json", + "runtime_acceptance": "pending" } } diff --git a/.traceweaver/upgrade-button-20261104/anchor-authoring-note.json b/.traceweaver/upgrade-button-20261104/anchor-authoring-note.json new file mode 100644 index 0000000..97850eb --- /dev/null +++ b/.traceweaver/upgrade-button-20261104/anchor-authoring-note.json @@ -0,0 +1,4 @@ +{ + "updates.py": "Existing valid REQ-UPDATER-002 file anchor is preserved; helper refused an additional file premise due to conflicting_existing_anchor. New behavior linkage remains explicit in matrix and new verification anchors; no manual source anchor substituted.", + "html": "Helper generated hash-style comment for HTML; converted to inert HTML comment so no tool metadata is rendered in product UI." +} diff --git a/.traceweaver/upgrade-button-20261104/anchors.jsonl b/.traceweaver/upgrade-button-20261104/anchors.jsonl new file mode 100644 index 0000000..e69de29 diff --git a/.traceweaver/upgrade-button-20261104/anchors.md b/.traceweaver/upgrade-button-20261104/anchors.md new file mode 100644 index 0000000..0a6ac2a --- /dev/null +++ b/.traceweaver/upgrade-button-20261104/anchors.md @@ -0,0 +1,2 @@ +# Code Traceability Findings + diff --git a/.traceweaver/upgrade-button-20261104/authority.json b/.traceweaver/upgrade-button-20261104/authority.json new file mode 100644 index 0000000..bf0d4b2 --- /dev/null +++ b/.traceweaver/upgrade-button-20261104/authority.json @@ -0,0 +1,8 @@ +{ + "user_request_verbatim": "Please finish the repair, run it through GitHub CI, deploy it to LTX and verify IPMI is updated and the upgrade button works.", + "status": "explicit_owner_requested_repair_ci_ltx_deploy_and_button_verification", + "coordination_approval": "Yes, coordinate the deployment", + "scope": "Fix released-main System Updates eligibility for a pending valid selected service; preserve pinned exact targets, all backend/native guards, external owners and host-only Proxy replacement. No Charlotte changes.", + "label": "REQ-UPGRADEBUTTON-001 indexes this request; no new product requirement authority is invented.", + "source": "Direct owner message in this repair chat, 2026-11-04" +} diff --git a/.traceweaver/upgrade-button-20261104/plan.json b/.traceweaver/upgrade-button-20261104/plan.json new file mode 100644 index 0000000..43082da --- /dev/null +++ b/.traceweaver/upgrade-button-20261104/plan.json @@ -0,0 +1,20 @@ +{ + "id": "UPGRADE-BUTTON-20261104", + "baseline": "4e3538feed695dc3c0c49b179a38489fbcb06a38", + "steps": [ + "Reproduce missing pinned selected-service action with real page JavaScript test and missing selection binding assertion.", + "Expose selection SHA in status; show action only for eligible selected services; POST displayed ID/SHA; preserve host/external/unmanaged guards.", + "Run focused/full checks and independent scoped reviews.", + "Publish a bounded patch via normal required GitHub CI and release. Coordinate sole LTX lifecycle owner; deploy only published exact artefacts.", + "Verify disposable pending-selection button through its real request, plus live LTX installed version, health and real browser controls." + ], + "source_files": [ + "landing-page/index.html", + "src/cryptolabs_proxy/updates.py", + "tests/test_latest_status.py", + "tests/test_release_selection.py" + ], + "dependencies": "No new runtime dependencies or infrastructure.", + "risks": "A selected release can differ from the floating channel; action must preserve selected identity. Proxy host adoption remains separate. LTX deployment must be serialized with existing repair task.", + "rollback": "Retain native original container/private auth snapshot; use installed adoption recovery. No reset of failed history or speculative replay." +} diff --git a/.traceweaver/upgrade-button-20261104/profile.json b/.traceweaver/upgrade-button-20261104/profile.json new file mode 100644 index 0000000..39fc7c0 --- /dev/null +++ b/.traceweaver/upgrade-button-20261104/profile.json @@ -0,0 +1,28 @@ +{ + "schema_version": "tw-workflow-profile/1", + "work_item_id": "UPGRADE-BUTTON-20261104", + "profile_revision": 1, + "risk": "L2", + "reason": "Additive status API field and administrative UI request binding across two modules; unchanged lifecycle algorithms. Release/deployment retains existing high-risk native route.", + "selected_controls": [ + "test-first Node page reproduction", + "focused and full regression", + "one correctness review plus security specialist for administrative mutation entry", + "scoped traceability", + "official protected CI", + "native rollback and independent live/browser verification" + ], + "reviewer_cap": 2, + "repair_cycle_cap": 1, + "models": "Inherited available models; no model attestation claim", + "estimated_delivery_minutes": 75, + "process_target_minutes": 18.75, + "process_ceiling_minutes": 75, + "source_scope": [ + "landing-page/index.html", + "src/cryptolabs_proxy/updates.py", + "tests/test_latest_status.py", + "tests/test_release_selection.py" + ], + "held": "No live outcome or publication pass until observed." +} diff --git a/.traceweaver/upgrade-button-20261104/red-evidence.json b/.traceweaver/upgrade-button-20261104/red-evidence.json new file mode 100644 index 0000000..abffca0 --- /dev/null +++ b/.traceweaver/upgrade-button-20261104/red-evidence.json @@ -0,0 +1,7 @@ +{ + "status": "EXPECTED_FAILURE_OBSERVED_BEFORE_PRODUCTION_EDITS", + "source": "Current chat tool result f3e5a0, before first implementation apply_patch", + "command": "PYTHONPATH=src python3.14 -m pytest tests/test_latest_status.py::test_selected_pin_update_button_and_request tests/test_release_selection.py::test_baseline_status_reports_identity_and_unknown_candidate -q", + "result": "2 failed, 6 passed; real page omitted IPMI selected-pin button; status lacked selection_sha256.", + "qualification": "This receipt is written after implementation and records the earlier observed RED; it does not assert the receipt file predated source edits." +} diff --git a/.traceweaver/upgrade-button-20261104/review-correctness.json b/.traceweaver/upgrade-button-20261104/review-correctness.json new file mode 100644 index 0000000..19af8da --- /dev/null +++ b/.traceweaver/upgrade-button-20261104/review-correctness.json @@ -0,0 +1,14 @@ +{ + "reviewer": "correctness", + "findings": [], + "residual_risks": [ + "Clean scoped source review only. No CI, published-artifact, installed-LTX or real-browser lifecycle acceptance is established by this review.", + "The action reconciles an existing approved selected release; it does not choose or authorize a newer channel release. Proxy self-replacement remains delegated to the host owner.", + "The new source behavior is sound for backend-produced values: selected ID/SHA are captured synchronously with the rendered card and POSTed before the first await; backend selection validation rejects stale displayed policy. Missing SHA/target, blocked identity, external owner, lifecycle owner, stopped service and selected Proxy cannot expose a service Update action.", + "Reviewed source SHA256: {\"landing-page/index.html\": \"b096a96d18a761962ae86e6e8e8f3923b65c97429bb5aa83ce1be410b2d274f1\", \"src/cryptolabs_proxy/updates.py\": \"1053bdf6f0da4eb046890a62ce4ba7dfee66c4700a10eb6388f321924ff274af\", \"tests/test_latest_status.py\": \"2472d2b401c1030fab89fef9b37263e3bd3634c1aaed585fd824297a536357fc\", \"tests/test_release_selection.py\": \"a6d0a8ffc31afcaec4afc500b8cf44d5df0fcdc447b7b0553eaec7218a01a838\"}", + "Verification-only follow-up accepted: production behavior hashes unchanged; the added bulk case executes real updateAll() with matching displayed Proxy/IPMI selection and asserts service all plus exact ID/SHA. Focused parametrized test independently rerun: 11 passed in 0.43s." + ], + "testing_gaps": [ + "A policy change between display and submission is not directly exercised by the new page test. Existing backend selection-change tests provide related guard coverage; retain planned disposable/native and live browser validation." + ] +} diff --git a/.traceweaver/upgrade-button-20261104/review-security.json b/.traceweaver/upgrade-button-20261104/review-security.json new file mode 100644 index 0000000..a6569eb --- /dev/null +++ b/.traceweaver/upgrade-button-20261104/review-security.json @@ -0,0 +1,31 @@ +{ + "reviewer": "security", + "findings": [], + "status": "PASS_SCOPED_CHANGE_NO_NEW_EXPLOITABLE_PATH_FOUND", + "baseline": "4e3538feed695dc3c0c49b179a38489fbcb06a38", + "scope": "Additive selected-policy SHA status field, UI eligibility and displayed selection POST binding; backend selectors and authentication unchanged.", + "evidence": [ + "Backend get_all_versions iterates fixed SERVICES keys; service name used in inline onclick is not a new user-controlled value.", + "selection_sha256 is a public policy-byte digest, not an authentication secret; selection IDs and digests are validated by release_selection.validate.", + "submit_job validates the allowlisted service/action/channel, exact optional selection pair, installed policy, enabled component ownership, clear recovery state, current updater capabilities and host-only Proxy adoption before dispatch.", + "Native selected worker revalidates selection bytes, manifest bytes, admitted artifact digests/platform and source runtime after pulls and before first stop; UI flags do not grant new authority.", + "Page test exercised real HTML JavaScript and verified selected ID/SHA in POST. Focused independent command returned11PASS in0.46s." + ], + "residual_risks": [ + { + "kind": "pre_existing_boundary_not_changed", + "detail": "Released baseline nginx /api/update and /api/pull use generic /_auth_check; /auth/headers accepts logged-in readonly sessions, and health-api does not inspect a role. Thus this scoped patch preserves existing authentication behavior but does not establish administrator-only mutation authorization. The endpoint could already be called directly before this change; this is not reported as a newly introduced vulnerability. Do not describe this review as proving an admin-only API." + } + ], + "testing_gaps": [ + "GitHub CI, native staging, published payload identity, actual LTX deployment and production browser acceptance were not exercised by this reviewer and remain held.", + "No claim of security approval for unreleased dev/broker surfaces or full baseline service security." + ], + "source_sha256": { + "landing-page/index.html": "b096a96d18a761962ae86e6e8e8f3923b65c97429bb5aa83ce1be410b2d274f1", + "src/cryptolabs_proxy/updates.py": "1053bdf6f0da4eb046890a62ce4ba7dfee66c4700a10eb6388f321924ff274af", + "tests/test_latest_status.py": "22556274f2ef4f8450effff8f3f2026bd4303cc7e4323db34a869a7f10cd93dd", + "tests/test_release_selection.py": "a6d0a8ffc31afcaec4afc500b8cf44d5df0fcdc447b7b0553eaec7218a01a838" + }, + "writes": "Only this review-security.json report; no source, publication or runtime changes." +} diff --git a/.traceweaver/upgrade-button-20261104/validation.md b/.traceweaver/upgrade-button-20261104/validation.md new file mode 100644 index 0000000..fce98f6 --- /dev/null +++ b/.traceweaver/upgrade-button-20261104/validation.md @@ -0,0 +1 @@ +Owner: this repair chat. Verify a running pending valid selected IPMI target exposes an Update selected release control; clicking sends the displayed selection ID and exact SHA to the existing authenticated API. Stale policy is rejected by existing backend checks. External, stopped, blocked, unmanaged and Proxy host-only cases have no service Update action. Observe published exact Proxy image on LTX, IPMI updated to official1.4.0 or later, fresh health, and real browser controls. Existing deployment chat owns its single IPMI retry; no duplicate lifecycle mutation. Runtime acceptance remains pending. diff --git a/.traceweaver/upgrade-button-20261104/verification.json b/.traceweaver/upgrade-button-20261104/verification.json new file mode 100644 index 0000000..2c1b4af --- /dev/null +++ b/.traceweaver/upgrade-button-20261104/verification.json @@ -0,0 +1,18 @@ +{ + "status": "PASS_LOCAL_SOURCE", + "focused": "102 passed; real page per-service and bulk request bindings", + "full": "1013 passed, 2 unchanged skips; 104.65 seconds; macOS Python3.14.6 with local Unix sockets enabled", + "full_log_sha256": "a00d387ea1e19562e6d9376cc227518611651a3c03be34c7bfb103e87977cd0c", + "source_sha256": { + "landing-page/index.html": "b096a96d18a761962ae86e6e8e8f3923b65c97429bb5aa83ce1be410b2d274f1", + "src/cryptolabs_proxy/updates.py": "1053bdf6f0da4eb046890a62ce4ba7dfee66c4700a10eb6388f321924ff274af", + "tests/test_latest_status.py": "2472d2b401c1030fab89fef9b37263e3bd3634c1aaed585fd824297a536357fc", + "tests/test_release_selection.py": "a6d0a8ffc31afcaec4afc500b8cf44d5df0fcdc447b7b0553eaec7218a01a838" + }, + "held": [ + "GitHub CI", + "official artifact identity", + "LTX deployment", + "production browser acceptance" + ] +} diff --git a/.traceweaver/upgrade-button-20261104/vv-capsule.json b/.traceweaver/upgrade-button-20261104/vv-capsule.json new file mode 100644 index 0000000..88a08dc --- /dev/null +++ b/.traceweaver/upgrade-button-20261104/vv-capsule.json @@ -0,0 +1,32 @@ +{ + "schema_version": "tw-vv-capsule/1", + "workflow_profile": "L2", + "work_item_id": "UPGRADE-BUTTON-20261104", + "plan_ref": ".traceweaver/upgrade-button-20261104/plan.json", + "requirements": [ + { + "req_id": "REQ-UPGRADEBUTTON-001", + "trace_id": "TRACE-UPGRADEBUTTON-001", + "ver_id": "VER-UPGRADEBUTTON-001", + "val_id": "VAL-UPGRADEBUTTON-001", + "verification_artifact": "tests/test_latest_status.py", + "red_evidence": ".traceweaver/upgrade-button-20261104/red-evidence.json", + "validation_artifact": ".traceweaver/upgrade-button-20261104/validation.md", + "matrix_row_ref": "TRACE-UPGRADEBUTTON-001", + "reviews": [ + { + "gate": "tw-code-review", + "id": "UPGRADEBUTTON-CORRECTNESS", + "status": "passed", + "evidence_path": ".traceweaver/upgrade-button-20261104/review-correctness.json" + }, + { + "gate": "tw-code-review", + "id": "UPGRADEBUTTON-SECURITY", + "status": "passed", + "evidence_path": ".traceweaver/upgrade-button-20261104/review-security.json" + } + ] + } + ] +} diff --git a/landing-page/index.html b/landing-page/index.html index a12c487..ed33af1 100644 --- a/landing-page/index.html +++ b/landing-page/index.html @@ -1,3 +1,4 @@ + @@ -1355,6 +1356,8 @@

${service.displayName}

} // Load versions + let displayedUpdateSelections = {}; + async function loadVersions() { const grid = document.getElementById('versionsGrid'); try { @@ -1371,6 +1374,7 @@

${service.displayName}

// Render version cards let html = ''; let updatableCount = 0; // Track how many services can be updated + displayedUpdateSelections = {}; for (const [name, info] of Object.entries(data)) { if (name === '_settings') continue; @@ -1402,19 +1406,33 @@

${service.displayName}

versionText = 'Not running'; } + const selected = Boolean(info.selection_id); + const boundSelection = selected && /^[a-f0-9]{64}$/.test(info.selection_sha256 || ''); + const selectedManaged = boundSelection && info.owner === 'proxy-updater' + && info.target_image && !info.reason && info.state !== 'blocked'; + displayedUpdateSelections[name] = boundSelection ? { + selection_id: info.selection_id, selection_sha256: info.selection_sha256 + } : null; + if (name === 'cryptolabs-proxy') displayedUpdateSelections.all = displayedUpdateSelections[name]; let updateBtn = ''; if (info.running && info.latest_status !== 'latest') { updateBtn = `${info.latest_status === 'update_available' ? 'Update available' : 'Unable to verify · Check Updates'}`; } if (info.lifecycle_manager) { updateBtn += 'Managed by Server Manager'; - } else if (info.pinned) { + } else if (selected && name === 'cryptolabs-proxy') { + updateBtn += 'Managed by host updater'; + } else if (selected && !selectedManaged) { + updateBtn += 'Selected release unavailable · Check Updates'; + } else if (info.pinned && !selectedManaged) { updateBtn += 'Pinned image · managed separately'; } else if (!info.running) { updateBtn = 'Use service setup to start'; } else if (info.update_available === true) { - updateBtn += ``; + updateBtn += ``; updatableCount++; + } else if (selectedManaged) { + updateBtn += 'Selected release installed'; } // Self badge for proxy @@ -1543,7 +1561,7 @@

${service.displayName}

const response = await fetch(action === 'pull' ? '/api/pull' : '/api/update', { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ service, branch }) + body: JSON.stringify({ service, branch, ...(displayedUpdateSelections[service] || {}) }) }); const data = await response.json(); if (data.job && (response.ok || response.status === 409)) { diff --git a/pyproject.toml b/pyproject.toml index 5baa9e3..139aeb3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "cryptolabs-proxy" -version = "1.6.1" +version = "1.6.2" description = "Unified reverse proxy and fleet management landing page for CryptoLabs products" readme = "README.md" license = {text = "MIT"} diff --git a/requirements.md b/requirements.md index 4b8da7d..8e83d75 100644 --- a/requirements.md +++ b/requirements.md @@ -61,3 +61,8 @@ Authority: `.traceweaver/updater-stop-20261104/authority.json`, unchanged approv 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: `.traceweaver/updater-stop-20261104/compatibility/owner-approval.json` and approved addendum. Verification `VER-UPDATER-003`; validation `VAL-UPDATER-003`. Operational outcomes remain held. + + +## REQ-UPGRADEBUTTON-001 — requested selected-service upgrade control repair + +The owner requests completion through CI, LTX deployment, updated IPMI and a working upgrade button. The bounded repair exposes the existing approved selected-service update action and binds the displayed selection identity, retaining unmanaged pins, external ownership, Proxy host adoption and backend guards. Authority: `.traceweaver/upgrade-button-20261104/authority.json`; verification `VER-UPGRADEBUTTON-001`, validation `VAL-UPGRADEBUTTON-001`. Runtime acceptance remains pending. diff --git a/src/cryptolabs_proxy/__init__.py b/src/cryptolabs_proxy/__init__.py index eb63c19..8d5479e 100644 --- a/src/cryptolabs_proxy/__init__.py +++ b/src/cryptolabs_proxy/__init__.py @@ -1,6 +1,6 @@ """CryptoLabs Proxy - Unified reverse proxy for CryptoLabs products.""" -__version__ = "1.6.1" +__version__ = "1.6.2" # Export programmatic setup API from .setup import ( diff --git a/src/cryptolabs_proxy/updates.py b/src/cryptolabs_proxy/updates.py index 9e98e6e..949c5f3 100644 --- a/src/cryptolabs_proxy/updates.py +++ b/src/cryptolabs_proxy/updates.py @@ -268,7 +268,8 @@ def update_status(name, branch, *, engine=None, selection_directory=None, direct result.update(reason='disabled', state='skipped') return result target = policy.get('reference') - result.update(origin=policy['origin'], owner=policy['owner'], selection_id=snapshot['selection_id']) + result.update(origin=policy['origin'], owner=policy['owner'], + selection_id=snapshot['selection_id'], selection_sha256=snapshot['selection_sha256']) else: target = target_for(name, source, branch) result.update(desired=target, observed=source['Image']) diff --git a/tests/test_latest_status.py b/tests/test_latest_status.py index 4227e03..dfdef0e 100644 --- a/tests/test_latest_status.py +++ b/tests/test_latest_status.py @@ -1,3 +1,5 @@ +# TRACEWEAVER: file-role=selected-service-page-contract; req=REQ-UPGRADEBUTTON-001; trace=TRACE-UPGRADEBUTTON-001; ver=VER-UPGRADEBUTTON-001 +# TRACEWEAVER: verifies=VER-UPGRADEBUTTON-001; req=REQ-UPGRADEBUTTON-001; trace=TRACE-UPGRADEBUTTON-001 """Latest is a verified channel comparison, independent of update permission.""" import importlib.util import json @@ -11,6 +13,62 @@ from tests.test_updates import Engine, landing_script, source +@pytest.mark.parametrize('overrides,enabled', [ + ({}, True), + ({'owner': 'dc-vpm'}, False), + ({'selection_sha256': None}, False), + ({'running': False}, False), + ({'reason': 'identity_unavailable', 'state': 'blocked'}, False), + ({'target_image': None}, False), + ({'update_available': False}, False), + ({'_service': 'cryptolabs-proxy'}, False), + ({'selection_id': None}, False), + ({'lifecycle_manager': 'dc-overview'}, False), + ({'_bulk': True}, True), +]) +def test_selected_pin_update_button_and_request(overrides, enabled): + """The displayed selected target is the authority sent by the real page code.""" + overrides = dict(overrides) + service = overrides.pop('_service', 'ipmi-monitor') + bulk = overrides.pop('_bulk', False) + info = {'running': True, 'pinned': True, 'origin': 'customer-pin', + 'owner': 'proxy-updater', 'selection_id': 'site-release', + 'selection_sha256': 'a' * 64, 'target_image': 'repo@sha256:' + 'b' * 64, + 'update_available': True, 'latest_status': 'unknown', **overrides} + script = landing_script() + ''' + loadWatchdogStatus = () => {}; + showUpdateStatus = () => {}; + globalThis.confirm = () => true; + const grid = {innerHTML: ''}, button = {style: {}}; + globalThis.document = { + getElementById: id => id === 'versionsGrid' ? grid : id === 'targetBranch' ? {value: 'main'} : null, + querySelector: () => button, + }; + let request; + globalThis.fetch = async (url, options) => { + if (url === '/api/versions') return {ok: true, json: async () => ({ + 'cryptolabs-proxy': {...INFO, update_available: false}, [SERVICE]: INFO + })}; + request = {url, body: JSON.parse(options.body)}; + return {ok: false, json: async () => ({error: 'test request captured'})}; + }; + (async () => { + await loadVersions(); + if (ENABLED) { if (BULK) await updateAll(); else await updateService(SERVICE); } + console.log(JSON.stringify({html: grid.innerHTML, disabled: button.disabled, request})); + })(); + '''.replace('INFO', json.dumps(info)).replace('ENABLED', json.dumps(enabled)).replace('SERVICE', json.dumps(service)).replace('BULK', json.dumps(bulk)) + result = subprocess.run(['node'], input=script, capture_output=True, text=True) + assert result.returncode == 0, result.stderr + actual = json.loads(result.stdout) + assert (f"updateService('{service}')" in actual['html']) is enabled + assert actual['disabled'] is (not enabled) + if enabled: + assert actual['request'] == {'url': '/api/update', 'body': { + 'service': 'all' if bulk else 'ipmi-monitor', 'branch': 'main', + 'selection_id': 'site-release', 'selection_sha256': 'a' * 64}} + + def health_api(): spec = importlib.util.spec_from_file_location('health_api_latest', Path(__file__).parents[1] / 'scripts/health-api.py') module = importlib.util.module_from_spec(spec) diff --git a/tests/test_release_selection.py b/tests/test_release_selection.py index d61c34c..41ac14e 100644 --- a/tests/test_release_selection.py +++ b/tests/test_release_selection.py @@ -1,3 +1,5 @@ +# TRACEWEAVER: file-role=selection-status-contract; req=REQ-UPGRADEBUTTON-001; trace=TRACE-UPGRADEBUTTON-001; ver=VER-UPGRADEBUTTON-001 +# TRACEWEAVER: verifies=VER-UPGRADEBUTTON-001; req=REQ-UPGRADEBUTTON-001; trace=TRACE-UPGRADEBUTTON-001 """Synthetic contract1 selection/update authority regressions.""" import hashlib import importlib.util @@ -235,6 +237,7 @@ def test_baseline_status_reports_identity_and_unknown_candidate(tmp_path): engine=SelectedEngine(tmp_path) result=updates.update_status('prometheus','main',engine=engine,selection_directory=directory) assert result['desired']==REF and result['origin']=='baseline' and result['observed']=='sha256:old' + assert result['selection_sha256'] == digest assert result['update_available'] is True original=engine.image engine.image=lambda ref: original(ref) if ref!=''+REF else (_ for _ in ()).throw(RuntimeError()) diff --git a/traceability-matrix.md b/traceability-matrix.md index 54f0476..1b1aaa5 100644 --- a/traceability-matrix.md +++ b/traceability-matrix.md @@ -4,6 +4,7 @@ | Trace | Requirement | Implementation | Verification | Validation | Status | | --- | --- | --- | --- | --- | --- | +| TRACE-UPGRADEBUTTON-001 | REQ-UPGRADEBUTTON-001 | landing-page/index.html; src/cryptolabs_proxy/updates.py; tests/test_latest_status.py; tests/test_release_selection.py | VER-UPGRADEBUTTON-001 | VAL-UPGRADEBUTTON-001 | Owner-approved source scope | | TRACE-PAIR-001 | REQ-PAIR-001 | src/cryptolabs_proxy/auth.py; src/cryptolabs_proxy/account_link.py; tests/test_account_link.py; nginx/nginx.conf; src/cryptolabs_proxy/templates/nginx.conf.j2 | VER-PAIR-001 | VAL-PAIR-001 | Owner-approved source authority; reviewed scope | | TRACE-PAIR-002 | REQ-PAIR-002 | src/cryptolabs_proxy/auth.py; src/cryptolabs_proxy/account_link.py; tests/test_account_link.py; nginx/nginx.conf; src/cryptolabs_proxy/templates/nginx.conf.j2 | VER-PAIR-002 | VAL-PAIR-002 | Owner-approved source authority; reviewed scope | | TRACE-PAIR-003 | REQ-PAIR-003 | src/cryptolabs_proxy/auth.py; src/cryptolabs_proxy/account_link.py; tests/test_account_link.py; nginx/nginx.conf; src/cryptolabs_proxy/templates/nginx.conf.j2 | VER-PAIR-003 | VAL-PAIR-003 | Owner-approved source authority; reviewed scope | @@ -43,6 +44,9 @@ The TRACE-PAIR rows identify owner-approved and quality-reviewed source implemen | src/cryptolabs_proxy/standard_adoption.py | REQ-UPDATER-003 | TRACE-UPDATER-003 | VER-UPDATER-003 | entrypoint | strict-released-standard-source | | tests/test_standard_adoption.py | REQ-UPDATER-003 | TRACE-UPDATER-003 | VER-UPDATER-003 | file-role | historical-adoption-contract | | tests/test_standard_adoption.py | REQ-UPDATER-003 | TRACE-UPDATER-003 | VER-UPDATER-003 | verifies | historical-adoption-contract | +| landing-page/index.html | REQ-UPGRADEBUTTON-001 | TRACE-UPGRADEBUTTON-001 | VER-UPGRADEBUTTON-001 | file-role | selected-service-update-control | +| tests/test_latest_status.py | REQ-UPGRADEBUTTON-001 | TRACE-UPGRADEBUTTON-001 | VER-UPGRADEBUTTON-001 | verifies | selected-service-page-contract | +| tests/test_release_selection.py | REQ-UPGRADEBUTTON-001 | TRACE-UPGRADEBUTTON-001 | VER-UPGRADEBUTTON-001 | verifies | selection-status-contract | | src/cryptolabs_proxy/templates/released-standard-1.5.4/acme-challenge.conf.j2 | REQ-UPDATER-003 | TRACE-UPDATER-003 | VER-UPDATER-003 | Exception | Immutable released/synthetic resource; SHA256 7e594162700825757c9d402971094448aa1834d1f7121ac1c02f152f345e149a; root-precode-review.json generated_resource_anchor_exception; external provenance mapping, no inline mutation | | src/cryptolabs_proxy/templates/released-standard-1.5.4/exporter-auth-routes.conf.j2 | REQ-UPDATER-003 | TRACE-UPDATER-003 | VER-UPDATER-003 | Exception | Immutable released/synthetic resource; SHA256 450f4c418c09474ac45b6dd314c47cc090fe7d230a0206b30e48c7975023133b; root-precode-review.json generated_resource_anchor_exception; external provenance mapping, no inline mutation | @@ -76,3 +80,5 @@ These are generated raw data copies within the approved verification scope. Inli | --- | --- | --- | --- | --- | --- | Updater rows authorize source implementation only. GREEN/review/release checks and operational acceptance remain open until their evidence exists. Compatibility addendum is awaiting owner approval; no deployment GO is asserted. + +Selected-service upgrade control runtime acceptance remains pending; definition `.traceweaver/upgrade-button-20261104/validation.md`. Source scope follows the explicit owner request, without a deployed-outcome claim.