Watch
1
0
Fork
You've already forked RedFlag
0
RedFlag/agent
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Fimeg b82649967e RECONCILE-001: scan-set closure (close-by-absence) + v0.2.6.1
Treats each ecosystem scan as the authoritative full set for that
(agent, ecosystem) pair. Packages absent from a successful scan that
are still in a waiting state (pending/approved) are closed to installed
with out-of-band provenance — no operator action required.

State machine:
- Added pending/approved → installed edges (out-of-band resolution path)
- Added installed → pending edge (reactivation when a new version reappears)
- ReconcileFromScan updated to match: installed now reopens, ignored/failed preserved

Server (ReportUpdates):
- closeScanAbsentRows goroutine: diff waiting rows against reported set,
  transition absent rows via transitionStatus (guarded UPDATE, idempotent)
- Provenance stamping: redflag_receipt if a consumed capability token exists,
  out_of_band otherwise
- System event emitted per closure for audit trail
- scanEcosystemSupported gate: dnf/apt only; failed/partial scans never close rows

Agent:
- UpdateReport extended with Ecosystem + ScanSucceeded fields
- APT/DNF scan handlers now always report on successful scan (even 0 updates)
- HandleScanAPT/DNF/Updates: report failure is non-fatal (transport problem,
  scan succeeded locally)

Queries:
- GetTrackedNonResting: scoped to pending/approved only — in-flight states
  (checking_dependencies, pending_dependencies, installing) are orchestrator-owned
- TransitionByID: routes closure through the state machine
- HasConsumedTokenForUpdate: provenance check for the reconciler
- UpdateCurrentStateInTx SQL CASE: installed now reopens to pending on re-scan

Tests: reconcile_test.go (5 unit tests including load-bearing
TestWaitingStatesResolveOutOfBand), reconcile_test.go handler tests (7 sub-tests).

Bump: v0.2.6.1
2026-06-06 20:46:29 -04:00
..
cmd auth: instancelock, GetRefreshTokenForRenew, FOR UPDATE 2026-05-29 13:08:12 -04:00
internal RECONCILE-001: scan-set closure (close-by-absence) + v0.2.6.1 2026-06-06 20:46:29 -04:00
pkg/windowsupdate chore: add windowsupdate COM interface stubs and update third-party licenses 2026-05-21 13:48:42 -04:00
test-config refactor: rename aggregator-agent to agent for public release 2026-05-21 13:19:18 -04:00
go.mod swap uuid lib, windows installer pass, README/RAF copy 2026-06-03 15:39:49 -04:00
go.sum swap uuid lib, windows installer pass, README/RAF copy 2026-06-03 15:39:49 -04:00
install.sh feat: install/sync/RL hardening + upstream version sync subsystem 2026-05-23 15:12:20 -04:00
NOTICE refactor: rename aggregator-agent to agent for public release 2026-05-21 13:19:18 -04:00
uninstall.sh refactor: rename aggregator-agent to agent for public release 2026-05-21 13:19:18 -04:00