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
{{ message }}
Repository navigation
feat: flag SVCs as stale when their requirement changed after review #487
When a requirement or an SVC changes, nothing tells you that the tests verifying it were written against the old text. status keeps showing the requirement as complete as long as the same tests pass, even if the requirement now says something different. The revision and lifecycle fields exist, but no command compares them with anything.
Desired solution
Record, per SVC, which version of its requirement it was last reviewed against, and have status and validate flag the SVC as stale when the requirement has changed since.
One way:
A command (for example reqstool approve local -p docs/reqstool [--svc SVC_CORE_0001]) stores a content hash of each requirement and SVC in a lock file committed with the repository.
status and validate recompute the hashes and report an SVC as stale when its requirement or the SVC itself changed after approval, with an option to make that an error in CI.
The hash covers every field that changes meaning (title, description, significance, rationale, requirement_ids, lifecycle), not only the description, so a change cannot slip past by editing a field that is not hashed.
Alternatives considered
Compare the requirement's revision with a revision recorded on the SVC: no lock file, but relies on people bumping revision on every change.
Review the diff of requirements.yml in pull requests: works only if reviewers check which tests are affected.
Additional context
This turns "the tests pass" into "the tests pass and were reviewed against the current requirement", which is what traceability evidence is usually meant to show.
Record who approved, not only the hash. For example reqstool approve ... --by <name> writing {by, at, hash} per SVC. A lock file that says the SVC was reviewed but not by whom is weaker evidence than it looks. An entry without by could be reported as unapproved.
Hash meaning, not bookkeeping. The list in the issue is right to hash title, description, significance, rationale, requirement_ids and lifecycle. It should also leave out fields that do not change meaning (for example revision alone, formatting, key order), so a cosmetic edit does not invalidate every approval and teach people to re-approve without reading. Normalise the YAML before hashing.
A related idea: when status reports an SVC as stale, show which fields changed since approval, so the reviewer knows what to look at.
Activity
jimisola commentedon Nov 20, 2026
Two suggestions for the design:
reqstool approve ... --by <name>writing{by, at, hash}per SVC. A lock file that says the SVC was reviewed but not by whom is weaker evidence than it looks. An entry withoutbycould be reported as unapproved.requirement_idsand lifecycle. It should also leave out fields that do not change meaning (for examplerevisionalone, formatting, key order), so a cosmetic edit does not invalidate every approval and teach people to re-approve without reading. Normalise the YAML before hashing.A related idea: when
statusreports an SVC as stale, show which fields changed since approval, so the reviewer knows what to look at.