jbaruch / jbaruch/coding-policy
fix(herdr): Reject a shared SLICE_DIGEST and tell the caller how to fix an unreadable brief
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1
- Forks
- 2
- Avg merge
- 9h 22m
- Merged PRs (30d)
- 81
Description
Summary
Two advisories from #456's review rounds, deferred there (the PR's gates were green and every blocking finding was fixed in-round).
-
compose-briefs.shaccepts a sharedSLICE_DIGEST.SLICE_SCOPEandSLICE_PATHSare both rejected when supplied under.shared, since each belongs to one seat.SLICE_DIGESTis the same kind of per-seat derived value, but it is deleted from the merged values before the unused-key check with no.sharedguard — so a values file carrying.shared.SLICE_DIGESTis silently accepted and discarded rather than refused as misplaced boundary metadata. Add the guard beside the existing two, with a regression. -
cli.pyunreadable-brief diagnostic names no repair. The handler reports theOSError/UnicodeErrorand stops;rules/error-handling.mdActionable Messages wants the next step — restore a readable UTF-8 brief or regenerate it withcompose-briefs.sh, then re-run apply.
Test plan
-
.shared.SLICE_DIGESTis refused with the same shape as.shared.SLICE_PATHS - The unreadable-brief message names the repair
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in compose-briefs.sh beside the existing .shared.SLICE_SCOPE and .shared.SLICE_PATHS guards, then inspect cli.py's unreadable-brief handler and rules/error-handling.md. Run the relevant regression tests; done means .shared.SLICE_DIGEST is rejected consistently and the unreadable-brief diagnostic tells callers to restore readable UTF-8 or regenerate with compose-briefs.sh before rerunning apply.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, shell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100