Skip to content

canton: condense verbose module/choice doc comments#44

Merged
bengtlofgren merged 1 commit into
integration/cantonfrom
docs/canton-core-comment-density
Jul 16, 2026
Merged

canton: condense verbose module/choice doc comments#44
bengtlofgren merged 1 commit into
integration/cantonfrom
docs/canton-core-comment-density

Conversation

@bengtlofgren

Copy link
Copy Markdown

Summary

Judgment calls worth a second look

  • In GetGuardianGovernance's doc comment, dropped the incidental "...and an attacker guardian set" clause describing a forged CoreState -- the security point (gg is unforgeable) is preserved, just flagging the specific phrasing changed.
  • Treated CoreState's trailing field comments as fair game to tighten, not just the leading -- | block docs -- if you'd rather those stay verbatim, easy to revert just those hunks.
  • Left Governance.daml, VAA.daml, GuardianSet.daml, and README §10/§4.6 untouched -- already tight or judged too load-bearing/fact-dense to compress further without risk.

Test plan

  • Verified every changed line is either a full comment line or a trailing comment on an otherwise-unchanged code line (git diff filtered for non-comment changes: none found)
  • dpm build clean on both packages
  • dpm test: 44/44 passing (rebuilt after rebasing onto the merged integration/canton tip)

https://claude.ai/code/session_01VFr5RtBKysvjdRN2nKmhMV

Comment-only pass across canton/core and canton/test: the module and
choice-level doc comments had grown into multi-paragraph essays with
ALL-CAPS section labels and repeated restatements of the same point. Tighten
them to a sentence or short paragraph per fact, dropping narrative padding
while keeping every load-bearing invariant, security rationale, and
cross-reference intact (verified: every changed line is either a full
comment line or a trailing comment on an otherwise-unchanged code line).

Claude-Session: https://claude.ai/code/session_01VFr5RtBKysvjdRN2nKmhMV
@bengtlofgren
bengtlofgren requested a review from evan-gray as a code owner July 16, 2026 11:05
@bengtlofgren
bengtlofgren merged commit b5f88c3 into integration/canton Jul 16, 2026
24 of 28 checks passed
@bengtlofgren
bengtlofgren deleted the docs/canton-core-comment-density branch July 16, 2026 11:05
bengtlofgren added a commit that referenced this pull request Jul 16, 2026
…ew) (#45)

#41 merged directly without going through PR review. Reverting the
functional changes (the GetGuardianGovernance choice, the guardianGovernance
field on Emitter/EmitterRegistry/ReplayRootRegistry, the pin assertions at
the three fee-charging call sites, and the 3 regression tests proving them)
so the fix can go through proper review this time.

Deliberately does NOT touch #44 (comment cleanup) or anything else merged
since -- only the functional pieces #41 introduced, hand-picked out of the
current tree so #44's independent comment tightening survives untouched in
the same files. Verified: dpm build clean, 41/41 tests passing (44 minus the
3 regression tests testing now-reverted functionality).

A follow-up PR (the literal git revert of this commit) will re-propose
adding this back, for review this time.
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