Candidate legacy-sidecar paths, most-preferred first: the normalized-id path (what the current `attest` writes) and the raw-arg path an M1a-era build wrote (it sanitized the RAW CLI arg, un-normalized). Probing both lets the dual-read fallback find pre-upgrade sidecars regardless of the id form the original `attest` was invoked with. De-dups when the two coincide.
(repo: &Repository, id: &str)
| 176 | /// dual-read fallback find pre-upgrade sidecars regardless of the id form the |
| 177 | /// original `attest` was invoked with. De-dups when the two coincide. |
| 178 | fn attested_sidecar_candidates(repo: &Repository, id: &str) -> CliResult<Vec<PathBuf>> { |
| 179 | let normalized = attested_sidecar_path(repo, id)?; |
| 180 | let raw = repo |
| 181 | .dot_dir() |
| 182 | .join("canonical") |
| 183 | .join("intents") |
| 184 | .join(sanitize_id(id)) |
| 185 | .join("attested.jsonld"); |
| 186 | let mut candidates = vec![normalized]; |
| 187 | if !candidates.contains(&raw) { |
| 188 | candidates.push(raw); |
| 189 | } |
| 190 | Ok(candidates) |
| 191 | } |
| 192 | |
| 193 | /// A hash of the source lift inputs, recorded in the sidecar so a later edit to |
| 194 | /// the intent can be detected as making the attestation stale. This is a |
no test coverage detected