Compare commits

...
6 Commits
Author SHA1 Message Date
admin 3411592b80 agent: the report of release 0.175.1
gates / gates (push) Successful in 47s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-11-15 12:11:20 +01:00
admin 5798b4bc2b agent 0.175.1 is vouched (2026-11-15 11:07:35 CET): the day-0 pin
gates / gates (push) Successful in 43s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-11-15 11:08:04 +01:00
admin 404b105506 agent v0.175.1: the changelog heading (released, not vouched)
gates / gates (push) Successful in 36s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-11-15 10:09:42 +01:00
admin 88d5d56b50 agent (unreleased): the quiet branch for older root files never hides a failed pin (the commit's security review)
gates / gates (push) Successful in 38s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-11-15 10:08:05 +01:00
admin 5ecdd3d521 agent (unreleased): root files older than the agent are not a trust problem on a pinned box (a false operator mail at every box's update)
gates / gates (push) Successful in 41s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-11-15 10:06:17 +01:00
admin 3ea208b8fb agent v0.175.0: the changelog heading (released, not vouched)
gates / gates (push) Successful in 39s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
2026-11-15 09:50:38 +01:00
5 changed files with 147 additions and 35 deletions

No files matched your search

+20 -3
View File
@@ -1,4 +1,21 @@
## Unreleased (2026-11-15) — a cut write of `agent.json` cannot leave a blind box (R-1380; found before the release) ## v0.175.1 (2026-11-15) — root files older than the agent are not a trust problem — RELEASED 2026-11-15 (release-agent.sh from the clean working clone at `88d5d56`, CI run id 2678; agent sha256 38b1e2350de90a7940c16f8cd2a21d83fcd535410d1017a7df0fee14f0904612, bundle sha256 07ebf86362ed9d44776416bd5c2c4b6b629e44d34595a8120fd8fc3f4d9277ff) and VOUCHED 2026-11-15 11:07:35 CET. 0.175.0 was released the same morning, reached Tester 1 only, and is NOT to be vouched
- **`pvetrust.Ensure`: the wrapper's „unknown mode” refusal on a PINNED box names no problem.** Between the signed
agent update and the signed root-files job, the box's wrapper does not know `pve-ca-copy`. 0.175.0 reported
`ca_copy_unavailable` for those minutes and the hub mailed the operator (seen on Tester 1, 2026-11-15 10:04). The
pin works, so nothing is wrong; the bundle install runs the move. An unpinned box, and every other refusal, still
names the problem. Test `TestRootStepOlderThanTheAgent_IsNotATrustProblem`; 3 mutations seen red.
- **The quiet branch never hides a failed pin** (the commit's security review): it is taken only when the run was
not started by a failed call and no trust failure is recorded, and only for the wrapper's code R11.
`TestRootStepOlderThanTheAgent_NeverHidesAFailedPin`; 3 more mutations seen red (felhom.eu
`documentation/audits/release-2b-3-2026-11-15/part2/`).
## v0.175.0 (2026-11-15) — trust in Proxmox by a copy of the box's own root CA (R-1380, release 2b); the agent tells the hub its clock, a refused job, a give-up and what a clean-up did (release 3); a boot key a clock step cannot move (R-1395) — RELEASED 2026-11-15 (release-agent.sh from the clean working clone at `db01ae0`, CI run id 2671; agent sha256 d1a30ed51f6663d96369ad3e88c221194af92773addf4fbb48852ee58be4b19a, bundle sha256 3b4a8b78155fc4385148c98c229da2e61e7c6b02bad9ed9f1fdc4a9ea1370d95); NOT vouched yet
`configs/` changed (the wrapper's `pve-ca-copy` mode), so a box needs BOTH signed jobs: `agent_update`, then
`agent_config_update`. The three sections below were built on 2026-11-14 night and 2026-11-15 morning.
### A cut write of `agent.json` cannot leave a blind box (R-1380; found before the release, 2026-11-15)
- **`config.ReplaceInPlace` + `config.RecoverCutWrite`** (`internal/config/cutwrite.go`). `agent.json` is the agent's - **`config.ReplaceInPlace` + `config.RecoverCutWrite`** (`internal/config/cutwrite.go`). `agent.json` is the agent's
file in a root-owned folder, so the trust move, the PBS seed and the backup-target move write it in place file in a root-owned folder, so the trust move, the PBS seed and the backup-target move write it in place
@@ -9,7 +26,7 @@
four steps, the wiring in `main`, and a source pin that the three writers use the helper and open no file by hand. four steps, the wiring in `main`, and a source pin that the three writers use the helper and open no file by hand.
Red-proofs: felhom.eu `documentation/audits/release-2b-3-2026-11-15/part0/`. Not proven: a real power cut. Red-proofs: felhom.eu `documentation/audits/release-2b-3-2026-11-15/part0/`. Not proven: a real power cut.
## Unreleased (2026-11-14 night) — release 3 („the hub tells you”) and the clock-step fix, the agent's parts, built and NOT released ### Release 3 („the hub tells you”) and the clock-step fix, the agent's parts (2026-11-14 night)
Commit only. Each part can be released alone; none needs release 2b. No `configs/` change in this section. Commit only. Each part can be released alone; none needs release 2b. No `configs/` change in this section.
@@ -66,7 +83,7 @@ Commit only. Each part can be released alone; none needs release 2b. No `configs
compares it with its clock and alarms above one minute. Test `TestReport_StampsSentAtAtSending`; 3 mutations seen compares it with its clock and alarms above one minute. Test `TestReport_StampsSentAtAtSending`; 3 mutations seen
red (felhom.eu `documentation/audits/night-build-2026-11-14/B/redproof-agent-sent-at.txt`). red (felhom.eu `documentation/audits/night-build-2026-11-14/B/redproof-agent-sent-at.txt`).
## Unreleased (2026-11-14 night) — release 2b, built and NOT released: trust in Proxmox by a copy of the box's own root CA (R-1380, D80, felhom.eu `09` §3 decision 303; design `03-host-agent.md` §12a) ### Release 2b (2026-11-14 night): trust in Proxmox by a copy of the box's own root CA (R-1380, D80, felhom.eu `09` §3 decision 303; design `03-host-agent.md` §12a)
Commit only. No box ran any of this; the proof on a box (demo-hp, a forced new certificate, twice) is the next attended Commit only. No box ran any of this; the proof on a box (demo-hp, a forced new certificate, twice) is the next attended
session's. `configs/` changes, so the release needs BOTH signed jobs. session's. `configs/` changes, so the release needs BOTH signed jobs.
+16 -29
View File
@@ -1,31 +1,18 @@
# REPORT — v0.174.0 released, vouched and delivered to the three test boxes (2026-11-14, attended) # REPORT — agent 0.175.1 (2026-11-15)
**Plain words first.** A box now removes its old kernels by itself, and it reloads its security profiles after it Released and vouched in the attended run of 2026-11-15. The full report is felhom.eu `REPORT-release-2b-3-2026-11-15.md`.
starts on another kernel. Version 0.174.0 is released and runs on Tester 1, demo-hp and the N100. The operator vouched
it at 15:21 CET. The N100's time service runs again; the product repaired it, with no hand step.
The full report of the run is in `felhom.eu`: `REPORT-release-2a-2026-11-14.md`. - **What:** trust in Proxmox by a copy of the box's own root CA, with the move from a pinned certificate; the report
carries the clock at sending; a refused signed job, a guest-power give-up, the kernel clean-up detail and the
## What a reader must know profile refresh reach the hub; a boot key that a clock step cannot move; a cut write of `agent.json` is repaired at
start; root files older than the agent are not a trust problem on a pinned box.
1. **The clean-up runs on a box with the root-owned ring-0 mark only.** Tester 1 has no mark, so the program answers - **Versions:** 0.175.1 — binary sha256 `38b1e2350de90a7940c16f8cd2a21d83fcd535410d1017a7df0fee14f0904612`, bundle
„not run" there. For the proof the operator allowed the mark on Tester 1 for some minutes; it is back as before. `07ebf86362ed9d44776416bd5c2c4b6b629e44d34595a8120fd8fc3f4d9277ff`, from `88d5d56`, CI run 2678; vouched 2026-11-15
2. **The real removal on Tester 1 was started by hand**, with the agent's own command line. The night leg cannot be 11:07:35 CET; the day-0 pin is set. 0.175.0 (from `db01ae0`) was released the same morning, reached Tester 1 only,
started by day: it follows only the night's own backup (R-899). So „the step by the agent at night" is **not proven and is NOT vouched: it raised one false trust alarm between the agent update and the root-files update.
yet**; the N100's and demo-hp's night of 2026-11-15 is the proof. - **Proven on boxes:** Tester 1, demo-hp and the N100 moved (a working call with the copy first, the fingerprint
3. **The profile refresh was spiked first** on demo-hp (felhom.eu `audits/profile-refresh-spike-2026-11-14/`). Three cleared last); two forced new Proxmox certificates on demo-hp with no restart and no alarm; a wrong CA copy repaired
things it found are built in: a stale copy is told by the cached file changing, not by the kernel's hash; one at start; a fresh install starts with the copy and no fingerprint; the clock alarm at the hub.
profile never compiles the same twice; a refresh hides other kernel audit lines for a few seconds. - **Tests only:** the repair after a real power cut; the refused-job and give-up messages.
4. **A clock step makes the controller read a new boot** (felhom.eu R-1395, a controller row): on the N100 it - **Open:** a fully blind box sends no report (felhom.eu R-1396 gap 2); one Proxmox call answered 500 at day-0 with no
recreated three apps once. ERROR line (R-1397).
| | |
|---|---|
| Version | 0.174.0, sha256 `6efbb97809135483bc446d71d1321f9e2f7fc3268fe9b20e7fe742a2eb13db92`, bundle `7d87d0584dee79eee766f01c27b9e89273d39c89a14b0725a6e5564a55b3ec5f`, Go 1.27.4 |
| Code commit, CI | `cc63dd5`, run id 2641 success |
| Tests | wrapper 191 (42 new), agent `internal/osupdate` green; 30 mutations, each seen red (felhom.eu `audits/release-2a-2026-11-14/A`, `B`) |
| Tester 1 | 3 kernels → 2, 1.12 GB gained, 8.5 s; second run: nothing; one restart, same kernel, healthy, clean stop |
| demo-hp | nothing to remove; refusals P1, P2, P3 by dry run |
| The N100 | time service repaired (offset −32.55 s → +0.18 s); tonight it removes 6 of 8 kernels |
| Vouch | the operator, 2026-11-14 15:21:45 CET; `pinned.day0_agent` = 0.174.0 |
| Not proven | the step at night by the agent; a fell-back box and a self-revert into the kept kernel on a box; K1 on a box |
+31
View File
@@ -29,6 +29,7 @@ import (
"log/slog" "log/slog"
"os" "os"
"path/filepath" "path/filepath"
"strings"
"sync" "sync"
"time" "time"
@@ -246,6 +247,19 @@ func (m *Manager) Ensure(ctx context.Context, why string) bool {
c, err := m.EnsureCopy(cctx) c, err := m.EnsureCopy(cctx)
ccancel() ccancel()
if err != nil { if err != nil {
m.mu.Lock()
recorded := m.status.Problem
m.mu.Unlock()
if rootStepTooOld(err) && cur.Fingerprint != "" && !isTrustCause(why) && !isTrustCause(recorded) {
// The agent is newer than the box's root files: between the agent update and the root-files job the
// wrapper does not know the step yet. The pinned certificate works; this is not a trust problem, and
// naming one mailed the operator at every box's update (seen on Tester 1, 2026-11-15). The bundle
// install calls Ensure again. NEVER on a run that a failed call started, and never over a recorded
// trust failure: then the pin does NOT work, and the box must say so (the commit's security review).
lg.Info("pvetrust: the root files are older than this agent (no CA-copy step yet) — the pinned certificate stays; the next root-files update moves the box", "err", err)
set(modeOf(cur), "", "", nil)
return false
}
lg.Warn("pvetrust: the root step gave no CA copy — the trust stays as it is", "err", err) lg.Warn("pvetrust: the root step gave no CA copy — the trust stays as it is", "err", err)
set(modeOf(cur), ProblemCopyUnavailable, truncate(err.Error(), 240), nil) set(modeOf(cur), ProblemCopyUnavailable, truncate(err.Error(), 240), nil)
return false return false
@@ -404,3 +418,20 @@ func (m *Manager) writeConfig(caPath string) error {
} }
return nil return nil
} }
// rootStepTooOld says whether the root step refused because it does not know the CA-copy mode at all (the wrapper's
// R11 „unknown mode”): the box's root files are older than the agent. Pinned by
// TestRootStepOlderThanTheAgent_IsNotATrustProblem.
func rootStepTooOld(err error) bool {
return err != nil && strings.Contains(err.Error(), `"R11"`) && strings.Contains(err.Error(), "unknown mode")
}
// isTrustCause says whether s is one of the causes proxmox.TrustProblem names for a FAILED call.
func isTrustCause(s string) bool {
switch s {
case proxmox.TrustPinnedCertChanged, proxmox.TrustCAMismatch, proxmox.TrustCertExpired,
proxmox.TrustCAFileUnreadable, proxmox.TrustNameMismatch:
return true
}
return false
}
+77
View File
@@ -487,3 +487,80 @@ func TestProofCannotBeMadeNow_NoCauseNamed(t *testing.T) {
t.Fatalf("status = %+v moved=%v", st, b.m.Moved()) t.Fatalf("status = %+v moved=%v", st, b.m.Moved())
} }
} }
// Between the agent update and the root-files job the wrapper does not know the CA-copy step. A pinned box then has
// NO trust problem (the pin works): naming one mails the operator at every box's update. A box with NO working pin
// that gets the same refusal still names the problem.
func TestRootStepOlderThanTheAgent_IsNotATrustProblem(t *testing.T) {
p := newPKI(t, "PVE CA")
leaf := p.leaf()
srv := newPVE(t, leaf)
old := errors.New(`pve-ca-copy refused: {"code": "R11", "reason": "unknown mode 'pve-ca-copy'"}`)
b := newBox(t, srv, proxmox.TLSConfig{Fingerprint: fp(leaf)}, nil)
b.m.EnsureCopy = func(context.Context) (Copy, error) { return Copy{}, old }
before, _ := os.ReadFile(b.cfgPath)
if b.m.Ensure(context.Background(), "start") {
t.Fatal("the trust changed with no copy")
}
if st := b.m.Status(); st.Problem != "" || st.Mode != "fingerprint" {
t.Fatalf("a pinned box with older root files reports a trust problem: %+v", st)
}
if after, _ := os.ReadFile(b.cfgPath); string(after) != string(before) {
t.Fatal("the config was written")
}
// the same refusal on a box that is NOT pinned is still a problem: nothing else holds its trust up
b2 := newBox(t, srv, proxmox.TLSConfig{}, nil)
b2.m.EnsureCopy = func(context.Context) (Copy, error) { return Copy{}, old }
b2.m.Ensure(context.Background(), "start")
if st := b2.m.Status(); st.Problem != ProblemCopyUnavailable {
t.Fatalf("an unpinned box with no copy step must name the problem: %+v", st)
}
// and another refusal on a pinned box is still named
b3 := newBox(t, srv, proxmox.TLSConfig{Fingerprint: fp(leaf)}, nil)
b3.m.EnsureCopy = func(context.Context) (Copy, error) { return Copy{}, errors.New(`pve-ca-copy refused: {"code": "T3"}`) }
b3.m.Ensure(context.Background(), "start")
if st := b3.m.Status(); st.Problem != ProblemCopyUnavailable {
t.Fatalf("a real refusal lost its name: %+v", st)
}
// a refusal with ANOTHER code whose text happens to hold the words is still named: the code decides
b4 := newBox(t, srv, proxmox.TLSConfig{Fingerprint: fp(leaf)}, nil)
b4.m.EnsureCopy = func(context.Context) (Copy, error) {
return Copy{}, errors.New(`pve-ca-copy refused: {"code": "T3", "reason": "the source has an unknown mode"}`)
}
b4.m.Ensure(context.Background(), "start")
if st := b4.m.Status(); st.Problem != ProblemCopyUnavailable {
t.Fatalf("a refusal with another code was read as older root files: %+v", st)
}
}
// The quiet branch must never hide a box whose pin does NOT work: a run started by a failed call, or a run after a
// failed call was recorded, names the problem even when the root files are older than the agent.
func TestRootStepOlderThanTheAgent_NeverHidesAFailedPin(t *testing.T) {
p := newPKI(t, "PVE CA")
leaf := p.leaf()
srv := newPVE(t, leaf)
old := errors.New(`pve-ca-copy refused: {"code": "R11", "reason": "unknown mode 'pve-ca-copy'"}`)
// (1) the run was started by a failed call
b := newBox(t, srv, proxmox.TLSConfig{Fingerprint: fp(leaf)}, nil)
b.m.EnsureCopy = func(context.Context) (Copy, error) { return Copy{}, old }
b.m.Ensure(context.Background(), proxmox.TrustPinnedCertChanged)
if st := b.m.Status(); st.Problem == "" {
t.Fatalf("a run started by a failed pin reports no problem: %+v", st)
}
// (2) a failed call was recorded, then the timer runs
b2 := newBox(t, srv, proxmox.TLSConfig{Fingerprint: fp(leaf)}, nil)
b2.m.EnsureCopy = func(context.Context) (Copy, error) { return Copy{}, old }
b2.m.mu.Lock()
b2.m.status.Problem = proxmox.TrustPinnedCertChanged
b2.m.mu.Unlock()
b2.m.Ensure(context.Background(), "timer")
if st := b2.m.Status(); st.Problem == "" {
t.Fatalf("the timer cleared a recorded pin failure: %+v", st)
}
}
+3 -3
View File
@@ -24,10 +24,10 @@
"readers": [ "readers": [
"scripts/check-published-versions.py — asserts the newest N versions plus every pinned version" "scripts/check-published-versions.py — asserts the newest N versions plus every pinned version"
], ],
"recorded": "2026-11-14", "recorded": "2026-11-15",
"recorded_by": "CC 2026-11-14: day0_agent 0.174.0 (operator vouch 2026-11-14 15:21:45 CET, read from the hub log and from the hub's System page: agent=0.174.0, bundle 7d87d058… = the release; the save took 428 ms); earlier 0.173.0 (CC 2026-11-10) (operator vouch 2026-11-10 16:29:16 CET, read from the hub log: agent=0.173.0, bundle 51ebc1f4… = the release; the save took 232 ms); earlier 0.172.1 (CC 2026-11-07) (operator vouch 2026-11-07 ~23:00 CET, read from the hub DB with its WAL: artifact_agent_version=0.172.1, bundle 3e7acaee… = the release); earlier 0.172.0 (CC 2026-11-03) (operator vouch 2026-11-03 10:18:10 CET, read from the hub log and DB: agent=0.172.0, bundle cc34b0bc… = the release); earlier 0.171.0 (CC 2026-10-30) (operator vouch 2026-10-30 10:47:36 CET, read from the hub log: agent=0.171.0, bundle 95f977f6… = the release; the save took 132 ms with hub 0.178.0, R-1346); earlier 0.170.0 (operator vouch 2026-10-29 18:57:48 CET, read from the hub log: agent=0.170.0, bundle 03f2ff64… = the release; the save took 38.3 s, R-1346); earlier 0.169.0 (operator vouch 2026-10-29 14:06:09 CET, read from the hub log: agent=0.169.0, bundle 3ca33f9c… = the release; his browser got a 504 but the save went through); earlier 0.168.0 (vouch 10:21:56 CET); 0.167.0 (vouch 2026-10-27); 0.166.0 (vouch 2026-10-26 10:04:55 CET); D50 = A (operator 2026-10-25); earlier history: R-287 (2026-08-09), R-291 (2026-10-05)", "recorded_by": "CC 2026-11-15: day0_agent 0.175.1 (operator vouch 2026-11-15 11:07:35 CET, read from the hub log and from the hub's System page: agent=0.175.1, bundle 07ebf863… = the release; the save took 379 ms; 0.175.0 was released the same morning and is NOT vouched); earlier 0.174.0 (CC 2026-11-14) (operator vouch 2026-11-14 15:21:45 CET, read from the hub log and from the hub's System page: agent=0.174.0, bundle 7d87d058… = the release; the save took 428 ms); earlier 0.173.0 (CC 2026-11-10) (operator vouch 2026-11-10 16:29:16 CET, read from the hub log: agent=0.173.0, bundle 51ebc1f4… = the release; the save took 232 ms); earlier 0.172.1 (CC 2026-11-07) (operator vouch 2026-11-07 ~23:00 CET, read from the hub DB with its WAL: artifact_agent_version=0.172.1, bundle 3e7acaee… = the release); earlier 0.172.0 (CC 2026-11-03) (operator vouch 2026-11-03 10:18:10 CET, read from the hub log and DB: agent=0.172.0, bundle cc34b0bc… = the release); earlier 0.171.0 (CC 2026-10-30) (operator vouch 2026-10-30 10:47:36 CET, read from the hub log: agent=0.171.0, bundle 95f977f6… = the release; the save took 132 ms with hub 0.178.0, R-1346); earlier 0.170.0 (operator vouch 2026-10-29 18:57:48 CET, read from the hub log: agent=0.170.0, bundle 03f2ff64… = the release; the save took 38.3 s, R-1346); earlier 0.169.0 (operator vouch 2026-10-29 14:06:09 CET, read from the hub log: agent=0.169.0, bundle 3ca33f9c… = the release; his browser got a 504 but the save went through); earlier 0.168.0 (vouch 10:21:56 CET); 0.167.0 (vouch 2026-10-27); 0.166.0 (vouch 2026-10-26 10:04:55 CET); D50 = A (operator 2026-10-25); earlier history: R-287 (2026-08-09), R-291 (2026-10-05)",
"pinned": { "pinned": {
"hub_min_agent": "0.158.1", "hub_min_agent": "0.158.1",
"day0_agent": "0.174.0" "day0_agent": "0.175.1"
} }
} }