Repository navigation
fix(continuous-ops): never-audited heads, windowed views in a refresh, no ToolInspector NEED without tools (XWING-2440) - #322
Conversation
…ndowed views, no ToolInspector NEED without tools (XWING-2440)
PR Summary by QodoObserve never-audited heads and fix dashboard and tool freshness gaps
AI Description
Diagram
High-Level Assessment
Files changed (10)
|
Code Review by QodoResolved findings 1.
|
|
Qodo review resolved at ca2a4ba: (1) repository metadata and default ref commit atomically for successful observations; a forced ref-write failure now rolls both back, and (2) never-audited reads use stored facts when present, preserving the real push date, P3 dormancy tier and observation time while synthetic bootstrap behavior remains for no record/old audited facts. Both regressions failed before the fix and pass after it. Local gates: |
Plan:
plans/traust-standardization/0-continuous-ops/in-progress/18-shaun-live-runs.md(part)Plan 18, step 1 ("anything that needed a manual step becomes a code fix"): what the local rig (
make ops-smoke, engine779471d, Postgres) turned up in traust-core, plus the oneNEEDSCI sees ontraust-server. The traust half is traust-security/traust (pinned to this commit).What
repo_stateon a never-audited repositoryobserve_forge_factsreturnednever-auditedbefore any forge call; no head, no repo-state assessment, somanifest_sbomrefused every never-audited repository (no observed default head) and below-range never ran for them. On a fresh estate (SCI) that is every repositorynever-audited, so the router's rule-1 bootstrap is unchanged. Without network it is still not observedInsightService.refresh(None, ViewFilter())always failedprogramandspend("needs a window"), so everydashboardsorder degraded on themwindowedrefreshed with no window getsTimeWindow.month_of(as_of or now), the month the budget is kept in; a given window is kept; REST/buildwithout a window still refusesGET /v1/insights/freshnessontraust-server(no tools registered)tool-databasesandtoolchainrows "unavailable: … NEED(engine: ToolInspector)"Behaviour changes
forge:{host}bucket. The contracts definition ofnever-auditedstill says "Not observed"; its wording wants a contracts follow-up (Michele): "observed; no audit to compare against (bootstrap)".Changed tests
tests/v1/services/test_insight_freshness.py::test_renders_through_context| unavailable | toolchain |→ asserts it's absent and "No toolchain inspected."NEED(engine: ToolInspector)errortests/v1/services/test_provider_catalog.py::test_stale_reports_unfetched_and_uninspectable_databasesstale()was[("tool-databases", unavailable)]with the NEED text →[]tests/v1/services/test_portfolio_liveness.py::test_an_unobserved_repository_says_why[unaudited]New tests: never-audited observed with exactly
info,headand its head kept; not observed without network; a forge refusal keeps nothing; windowed views get the month ofas_of(or now) and keep a given window; an empty catalog stamps no tools.Reviewer checks (from the plan)
Quality checklist
TimeWindow.month_of, theper_itemview-attribute pattern)OBSERVEDinobservation.py, used byportfolio._keep)default_refand the repo-state publish are existing paths)Verification
make lint && make test: 8152 passed. The rig (traust branch pinned here, engine779471d, Postgres 16,octocat/Hello-World, never audited): before,manifest_sbomrefusednot_foundevery pass anddashboardsdegraded onprogram/spend; after,repo_statekeeps the head,manifest_sbomsucceeds,below-range-scansucceeds,dashboardsdegrades only onpqc-vendors(no claims recorded, expected).Legacy files