jbaruch / jbaruch/coding-policy

fix(herdr): Reject a shared SLICE_DIGEST and tell the caller how to fix an unreadable brief

Open
#461 0 comments 0 reactions 0 assignees View on GitHub

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).

  1. compose-briefs.sh accepts a shared SLICE_DIGEST. SLICE_SCOPE and SLICE_PATHS are both rejected when supplied under .shared, since each belongs to one seat. SLICE_DIGEST is the same kind of per-seat derived value, but it is deleted from the merged values before the unused-key check with no .shared guard — so a values file carrying .shared.SLICE_DIGEST is silently accepted and discarded rather than refused as misplaced boundary metadata. Add the guard beside the existing two, with a regression.

  2. cli.py unreadable-brief diagnostic names no repair. The handler reports the OSError/UnicodeError and stops; rules/error-handling.md Actionable Messages wants the next step — restore a readable UTF-8 brief or regenerate it with compose-briefs.sh, then re-run apply.

Test plan

  • .shared.SLICE_DIGEST is 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.