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
12 changes: 12 additions & 0 deletions .traceweaver/intent-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
}
}
Original file line number Diff line number Diff line change
@@ -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."
}
Empty file.
2 changes: 2 additions & 0 deletions .traceweaver/upgrade-button-20261104/anchors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Code Traceability Findings

8 changes: 8 additions & 0 deletions .traceweaver/upgrade-button-20261104/authority.json
Original file line number Diff line number Diff line change
@@ -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"
}
20 changes: 20 additions & 0 deletions .traceweaver/upgrade-button-20261104/plan.json
Original file line number Diff line number Diff line change
@@ -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."
}
28 changes: 28 additions & 0 deletions .traceweaver/upgrade-button-20261104/profile.json
Original file line number Diff line number Diff line change
@@ -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."
}
7 changes: 7 additions & 0 deletions .traceweaver/upgrade-button-20261104/red-evidence.json
Original file line number Diff line number Diff line change
@@ -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."
}
14 changes: 14 additions & 0 deletions .traceweaver/upgrade-button-20261104/review-correctness.json
Original file line number Diff line number Diff line change
@@ -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."
]
}
31 changes: 31 additions & 0 deletions .traceweaver/upgrade-button-20261104/review-security.json
Original file line number Diff line number Diff line change
@@ -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."
}
1 change: 1 addition & 0 deletions .traceweaver/upgrade-button-20261104/validation.md
Original file line number Diff line number Diff line change
@@ -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.
18 changes: 18 additions & 0 deletions .traceweaver/upgrade-button-20261104/verification.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
32 changes: 32 additions & 0 deletions .traceweaver/upgrade-button-20261104/vv-capsule.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
]
}
24 changes: 21 additions & 3 deletions landing-page/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- TRACEWEAVER: file-role=selected-service-update-control; req=REQ-UPGRADEBUTTON-001; trace=TRACE-UPGRADEBUTTON-001; ver=VER-UPGRADEBUTTON-001 -->
<!DOCTYPE html>
<html lang="en">
<head>
Expand Down Expand Up @@ -1355,6 +1356,8 @@ <h3>${service.displayName}</h3>
}

// Load versions
let displayedUpdateSelections = {};

async function loadVersions() {
const grid = document.getElementById('versionsGrid');
try {
Expand All @@ -1371,6 +1374,7 @@ <h3>${service.displayName}</h3>
// 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;
Expand Down Expand Up @@ -1402,19 +1406,33 @@ <h3>${service.displayName}</h3>
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 = `<span style="color: var(--text-muted); font-size: 0.8em;">${info.latest_status === 'update_available' ? 'Update available' : 'Unable to verify · Check Updates'}</span>`;
}
if (info.lifecycle_manager) {
updateBtn += '<span style="color: var(--text-muted); font-size: 0.8em;">Managed by Server Manager</span>';
} else if (info.pinned) {
} else if (selected && name === 'cryptolabs-proxy') {
updateBtn += '<span style="color: var(--text-muted); font-size: 0.8em;">Managed by host updater</span>';
} else if (selected && !selectedManaged) {
updateBtn += '<span style="color: var(--text-muted); font-size: 0.8em;">Selected release unavailable · Check Updates</span>';
} else if (info.pinned && !selectedManaged) {
updateBtn += '<span style="color: var(--text-muted); font-size: 0.8em;">Pinned image · managed separately</span>';
} else if (!info.running) {
updateBtn = '<span style="color: var(--text-muted); font-size: 0.8em;">Use service setup to start</span>';
} else if (info.update_available === true) {
updateBtn += `<button class="btn btn-primary btn-small" onclick="updateService('${name}')">⬆️ Update</button>`;
updateBtn += `<button class="btn btn-primary btn-small" onclick="updateService('${name}')">⬆️ ${selectedManaged ? 'Update selected release' : 'Update'}</button>`;
updatableCount++;
} else if (selectedManaged) {
updateBtn += '<span style="color: var(--text-muted); font-size: 0.8em;">Selected release installed</span>';
}

// Self badge for proxy
Expand Down Expand Up @@ -1543,7 +1561,7 @@ <h3>${service.displayName}</h3>
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)) {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
5 changes: 5 additions & 0 deletions requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion src/cryptolabs_proxy/__init__.py
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
3 changes: 2 additions & 1 deletion src/cryptolabs_proxy/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
Loading
Loading