Skip to content

docs(errors): lead every code with what happened and what to do - #407

Merged
PastaPastaPasta merged 3 commits into
masterfrom
docs/p0r-errors-restructure
Oct 6, 2026
Merged

PastaPastaPasta merged 3 commits into
masterfrom
docs/p0r-errors-restructure

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

What

docs/errors.md is the "more:" link on every dg and git-remote-dash error. Every entry now starts the same way:

  1. What happened, in plain words.
  2. What to do (was "Fix:"). E103, E104 and E803 didn't have this step and now do.
  3. Other cases, and other commands that report the same code, as before.
  4. A closing Protocol detail line for the Platform error and rule behind the code. Before, those details sat in the first sentence.

Specific changes:

  • E302, E307, E308, E309, E310, E509, E510, E601, E604 and E702 lead with what the user sees. Consensus codes (40120, 40128), gate names (ownerRefersTo), document types (repoKey, packManifest) and the late-content rule's 240 blocks move to Protocol detail.
  • E602 and E605 (retired), and E504, drop internal ids ("forge-v1", "D-517 fix").
  • E502, E606 and E703 drop field names and "fold" jargon.
  • E603, E704, E504 and E305 drop "unique index", "state transition", "on-chain" and "on chain"; key entries say "shared" rather than "wrapped".
  • The intro says how an entry reads. The exit-code table calls E6xx "write refused: permissions, conflicts or Platform rules", since some of those codes (E606, E607, E608) are Forge's own refusals.

Codes, headings and anchors are unchanged, so every more: link still lands on its entry.

Why

The roadmap's voice epic calls for this restructure (agent-isms R13). The first sentence of an entry is what someone lands on from an error, and for E601, the most common one, it read "40120 on path $ownerId, the ownerRefersTo gate". It now reads "Your identity doesn't have the role this write needs: you aren't a member with write access, or your role can't make this kind of change."

How tested

  • cargo test -p forge-core catalogue_codes_are_unique_and_documented passes: every catalogued code still has its ## Exxx section, and nothing else is documented.
  • I compared each rewritten lead against the facts in its protocol line and the code it describes.
  • Reviewed with code-review-validator. The first round found that the new E601 lead was false for pre-sign refusals and for members whose role is too low (High). It also found three Medium inaccuracies: the E6xx table row; which part of E604's message names what; and E601/E604 protocol details missing asMember, asMaintainer, 40127 and 10422. All are fixed in the second commit, along with its jargon and wording points.

Limits

  • Entries added by PRs still open (new codes for dg pr revert and the branch-delete warning) will be written in this format when they merge.

🤖 Generated with Claude Code

…ocol detail last

Each entry now says what happened in plain words, then 'What to do' (was 'Fix:'). Consensus codes, gate names and document types move from the lead sentences of E307, E308, E309, E510, E601, E604 and E702 to a closing 'Protocol detail' line. E103, E104 and E803 gain a 'What to do'. The retired E602/E605 and E504 drop internal ids, E502/E606/E703 drop field and fold jargon, and the intro says how an entry reads.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1f02110b-60e8-4151-b0ca-32b8e437df98
📥 Commits

Reviewing files that changed from the base of the PR and between dc417e9 and ef3b009.

📒 Files selected for processing (1)
  • docs/errors.md
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

PastaPastaPasta and others added 2 commits October 6, 2026 10:53
…04 and E601 protocol details, and plainer key and storage entries

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit d2f9ba1 into master Oct 6, 2026
10 checks passed
@PastaPastaPasta
PastaPastaPasta deleted the docs/p0r-errors-restructure branch October 6, 2026 16:21
PastaPastaPasta added a commit that referenced this pull request Oct 7, 2026
Resolve docs/errors.md and docs/guides/collaborating.md in master's new
structure (#407 "What to do" entries, #404 "say who enforces a rule"):
E306, E311, E312 and E313 keep this PR's content under "What to do",
E311 leads with "You're a member, but no key has been shared with you
yet" and points at Repair or `dg repo keys repair`. #397 is merged, so
the PENDING #397 markers go; PENDING #400 and 1D notes stay.
audiences.md's error entries use "What to do" and name Forge apps
rather than clients.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant