Skip to content

feat: private visibility for PRs, commits, and shipped files - #401

Merged
danielhanold merged 13 commits into
mainfrom
feat/private-visibility-keep-docket-out-of-prs-commits-and-shippe
Oct 6, 2026
Merged

danielhanold merged 13 commits into
mainfrom
feat/private-visibility-keep-docket-out-of-prs-commits-and-shippe

Conversation

@danielhanold

@danielhanold danielhanold commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

↩ Change 0532 — Implement private visibility for PRs, commits, and shipped files

In a private-visibility repository, docket no longer leaves traces on the shared remote:

  • PR descriptions are the authored prose only, and the spec copy ships without its change line.
  • A finalize block is recorded on the change only (no PR comment); backlink repointing skips private repositories.
  • A blocking leak check (internal/leakscan, internal/app/leak_check.go) runs before workspace publish, finalize publish and pr publish. It scans every outgoing non-merge commit (message, added lines, added paths), the merge-base diff, the feature branch name, and the PR title/body, and refuses with leak-detected and a per-hit list. Shared repositories never run it. ADR-0144 records the deliberate exception to report-only checks.
  • New leak_check.match_word key (default true) to let the bare word through.
  • repository check / prepare / workspace publish report docket/dckt branches and refs/docket/ refs on origin (report only). PushLease/PushCreateLease refuse any ref outside refs/heads/.
  • Skill and agent prose: the private-repository writing rule, the Visibility: dispatch field for every feature-branch writer, the leak-detected halt path, and a repoguard test deriving the writer set.

Build gate green at 62d525b (go run ./cmd/docket development test).

Review (deep tier)

# Severity Finding State
1 blocker Added lines were read only from the net base...head diff, so text added then removed across commits shipped unscanned fixed — 1ea8023
2 important The pushed feature branch name was never scanned fixed — 9fd3b69
3 important Finalize's integration-repair (and rebase-resolver) workers never received visibility or the writing rule; guard hand-listed writers fixed — 62d525b

…the net diff

Review finding: ReadOutgoing took added lines and paths only from the
three-dot diff base...head, so a fingerprint one outgoing commit adds and a
later commit removes was pushed (and visible in the PR's commits, carried by
a rebase-merge) yet never scanned.

ReadOutgoing now also reads the added paths and lines of every non-merge
commit in base..head (diff-tree against its parent, with the same pinned diff
options), attributing each to its commit. The three-dot diff stays, so
merge-introduced content is still scanned and merged-in upstream content is
still excluded; a three-dot entry a commit already adds is reported once. The
commit rides through leakscan into each leak hit and the refusal message.
Review finding: the feature branch name (<type>/<slug>, slug from the
change title) is shown on origin and the PR but was never scanned, so a
trivial private change titled "Fix the dckt alias" pushed
fix/fix-the-dckt-alias unrefused. runLeakCheck now feeds the target's
short feature branch to leakscan as a branch-name input, covering
workspace.publish, pr.publish, and finalize.publish, which all scan
through it.
…y and private writing rule

Review finding: finalize's integration-repair worker commits on the feature
branch without the repository visibility or the private-repository writing
rule, so a habitual repair commit could trip leak-detected at publish. Both
finalize gate dispatches now carry the Visibility payload line, both agents
state the rule, and the guard derives the writer set from the feature-scoped
inventory instead of a hand list.
@danielhanold
danielhanold merged commit d997c12 into main Oct 6, 2026
1 check passed
@danielhanold
danielhanold deleted the feat/private-visibility-keep-docket-out-of-prs-commits-and-shippe branch October 6, 2026 17:13
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