# D-137 tier-2 EXISTENCE sweep -- live, read-only, 2026-07-26
#
# Command (metadata only: stat over ssh, NO sudo, no file content read):
#   python3 scripts/creds-matrix.py --tier2 --remote \
#     --pending-stage vr0-phase01 --pending-stage vr0-phase02 \
#     --pending-stage vr0-phase03 --pending-stage tenant-onboard
#
# Pending stages supplied by the CALLER from CURRENT-STATE (GA-R1: the script
# carries no status claim). Hosts probed: jumphost (local), voffice1, office1-netbox.

=== creds-matrix: tier 1 (STATIC) ===
=== creds-matrix: tier 2 (EXISTENCE) ===
  [ok]   S1 schema: 72 rows, all enums valid, site-keys region-qualified, no duplicate (id,site,host-role,filename)
  [ok]   S3 render: 2 source field(s) SKIPPED -- rendering them needs the declared path from creds-manifests/vm-secret-locations (ruling 3); the list now EXISTS but the source-field derivation is not wired
  [ok]   S3 render drift: rendered row fields (mode, source) match checked-in; header prose and non-jumphost rows are OUT OF SCOPE of this compare
  [ok]   S4 mint-ref: every script:/runbook: reference resolves to a real location
  [ok]   S4 provenance debt: 27 row(s) are mint-ref=operator-terminal -- NOT reproducible from the repo (research FINDING 1). Admitted by design; converting them is remediation, not a checker fix.
  [ok]   S7 notes: 32 note key(s) referenced, all resolve, none orphaned
  [ok]   E0 jumphost location '~/vault-init/*' does not exist -- SKIPPED (typically a mint stage this deployment has not reached)
  [ok]   E0 jumphost location '~/octavia-pki/*' does not exist -- SKIPPED (typically a mint stage this deployment has not reached)
  [ok]   E1 17 expected artifact(s) deferred as not-yet-minted (--pending-stage)
  [ok]   E1 14 expected artifact(s) NOT JUDGED -- their role (headend, netbox) has at least one location that could not be probed, so absence cannot be asserted over it
  [FAIL] S2 vr1-dc0 EXPECTED-BUT-ABSENT: 'opnsense-api.txt' (id dc0-edge-api, SEC-021) is expected by the matrix but NOT declared in the manifest -- the credential is either missing or undeclared
  [FAIL] S2 vr1-dc0 EXPECTED-BUT-ABSENT: 'vr1-dc0-maas-power_ed25519' (id dc0-maas-power-key, SEC-021) is expected by the matrix but NOT declared in the manifest -- the credential is either missing or undeclared
  [FAIL] S2 vr1-dc0 EXPECTED-BUT-ABSENT: 'vr1-dc0-maas-power_ed25519.pub' (id dc0-maas-power-key, SEC-021) is expected by the matrix but NOT declared in the manifest -- the credential is either missing or undeclared
  [FAIL] S5 ASYMMETRY: vr1-dc0 declares id=dcN-maas-power-key file=maas-virsh_ed25519 on headend (custody=off-manifest-known) with no counterpart in vr1-dc1 -- a per-DC credential must exist at BOTH DCs in the same shape
  [FAIL] S6 IDENTITY CONFLATION: id 'maas-region-admin' serves 2 principal types (human via gui; service via api, cli-profile) -- ruling 5 requires one identity to serve one principal type
  [FAIL] E0 UNREADABLE: headend location '/root/maas-secrets/*' EXISTS but could not be listed -- no conclusion may be drawn about its contents; re-run with sufficient privilege
  [FAIL] E0 UNREADABLE: netbox location '/root/netbox-secrets/*' EXISTS but could not be listed -- no conclusion may be drawn about its contents; re-run with sufficient privilege
  [FAIL] E1 EXPECTED-BUT-ABSENT: dc0-maas-power-key 'vr1-dc0-maas-power_ed25519' expected at jumphost, not found (mint-stage stage3, SEC-021)
  [FAIL] E1 EXPECTED-BUT-ABSENT: dc0-maas-power-key 'vr1-dc0-maas-power_ed25519.pub' expected at jumphost, not found (mint-stage stage3, SEC-021)

FAIL: creds-matrix tier 1 -- 72 row(s), 10 check group(s) clean, 9 finding(s)
