You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Remove the `--verify-seed` mode from `hash-persister`.
This functionality is not needed because incremental hashing will be
validated externally by:
1. running `hash-persister` in normal, non-seeded mode to produce the
authoritative full hash artifact;
2. running `hash-persister` in seeded mode for the same destination
revision; and
3. comparing the two outputs with `hash-differ`.
Keeping this validation in the rollout orchestration preserves a clear
separation of responsibilities: `hash-persister` produces either full or
incrementally seeded artifacts, while CI decides when to run both modes
and how to report mismatches. It also lets the authoritative full result
remain unchanged if the shadow incremental run fails or diverges.
The change removes the `--verify-seed` flag, its dual-run orchestration
and verification-only report mode, the now-unused file-copy helper, and
the corresponding README section.
## Testing
- `bazel test //hash-persister:hash-persister_test //pkg:pkg_test`
Copy file name to clipboardExpand all lines: README.md
-17Lines changed: 0 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,23 +95,6 @@ hash-persister \
95
95
"${BASE_SHA}"
96
96
```
97
97
98
-
#### Verifying incremental results
99
-
100
-
`--verify-seed` runs both incremental and full hashing for the destination revision and compares the resulting target hashes:
101
-
102
-
```sh
103
-
hash-persister \
104
-
--working-directory . \
105
-
--query-backend=query \
106
-
--output "hashes-${NEW_SHA}.json" \
107
-
--seed-file "hashes-${BASE_SHA}.json" \
108
-
--seed-sha "${BASE_SHA}" \
109
-
--verify-seed \
110
-
"${NEW_SHA}"
111
-
```
112
-
113
-
Verification exits nonzero if the two results differ or if incremental execution falls back to full hashing. When the two computations differ, the output path receives the full result so it remains safe for investigation and downstream use. A fallback stops verification rather than treating two full computations as evidence that incremental mode is correct. Verification is intended for rollout checks and sampling rather than the normal fast path because it deliberately performs both computations.
114
-
115
98
#### Execution reports
116
99
117
100
Pass `--execution-report <path>` to write a versioned, machine-readable JSON summary. The report distinguishes the requested mode from the mode actually used, records success or failure and any fallback code, and includes counts for changed files, dirty packages and targets, recomputed targets, reused targets, and total targets. This lets CI systems emit bounded metrics without parsing human-readable logs.
returnfmt.Errorf("verify-seed found %d hash differences", len(result.Differences))
543
-
}
544
-
}
545
-
546
469
funcparseFlags() (*hashPersisterFlags, error) {
547
470
varflagshashPersisterFlags
548
471
flags.commonFlags=cli.RegisterCommonFlags()
549
472
flag.StringVar(&flags.outputFile, "output", "", "Output file path for persisted hashes (required)")
550
473
flag.BoolVar(&flags.seedableOutput, "seedable-output", false, "Include dependency edges and compatibility metadata so the output can seed incremental hashing")
551
474
flag.StringVar(&flags.seedFile, "seed-file", "", "Path to a compatible seed hash file for incremental hashing")
552
475
flag.StringVar(&flags.seedSha, "seed-sha", "", "Git commit SHA of the seed file (required with --seed-file)")
553
-
flag.BoolVar(&flags.verifySeed, "verify-seed", false, "Run both seeded and full computation, compare, exit non-zero on divergence")
554
476
flag.StringVar(&flags.reportFile, "execution-report", "", "Optional path for a machine-readable JSON execution report")
0 commit comments