fix(setup): known-agent-login flag, merge method detection, truncation warnings, drop dead runChecks - #60
Merged
Merged
Conversation
…n warnings, drop dead runChecks Closes several setup and defaults gaps from issue #55, and the documentation half of issue #54: - init gains --known-agent-login (mirrors --reviewer) and names knownAgentLogins in its printed summary. - pr_expedite/pr_approve_dep_upgrade resolve a repository's allowed merge methods (new OctokitGateway.getAllowedMergeMethods) or a configured mergeMethodByRepo entry when a call omits mergeMethod, instead of always falling back to "merge" and 405ing on a squash-only or rebase-only repo. - All three discover.mjs scripts (and their .pi/taskflows mirrors) warn on stderr when a gh call returns exactly the --limit cap, since gh truncates silently past it. - runChecks is removed from the config schema and docs: no non-test code ever read it, per SECURITY.md's own admission. Schemas regenerated. - pi/src/extension.ts memoizes the default OctokitGateway per process so its ETag cache and cached login survive across tool calls in a run. - docs/quick-start.md now says where a dashboard user will read it that captureMetadata must be on for per-agent attribution. - Documents the Dependabot alerts permission (issue #54) in SECURITY.md and docs/quick-start.md, and init now makes a best-effort probe of that endpoint, warning when autonomy=auto could never fire without it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io>
yshyn-iohk
enabled auto-merge (squash)
August 21, 2026 05:36
yshyn-iohk
added a commit
that referenced
this pull request
Aug 21, 2026
…ional (#64) Stacked on #60, which removed `runChecks` from the schema. This finishes the job: the field was still described in six places after the removal. The two that mattered are the skill files. Both told the reviewing agent not to run the repository's build or test scripts **"unless `runChecks` is enabled"**, which reads as though there is a way to enable it. There is not, and there should not be: the diff under review is untrusted input, so executing it is out of scope for a review. The rule is now unconditional, which is both accurate and stronger than what it replaced. The rest: - `docs/files-and-directories.md` listed it as a config field; it now lists `reviewers` and `knownAgentLogins` instead, which do exist. - `examples/config.json` shipped it as an example value; the example now shows the fields a real setup needs, including the `knownAgentLogins` that three other documents call the easy one to forget. - ADR 0007 keeps its original decision text and gains a dated note. An ADR records a decision that was made, so rewriting it would be dishonest; the decision did not change, only the mechanism that was supposed to gate it. - Six test fixtures still passed the dead field. Harmless (zod strips unknown keys), but a reader grepping for it would reasonably conclude it exists. After this, the only remaining mention in the repository is the deliberate historical note in `SECURITY.md` and the ADR note above. ## Verification 629 tests green, plus typecheck, `typecheck:test`, `check:schemas`, and `check:version` (0.5.0, no bump). No behavior change outside the skill instruction, which is documentation the agent follows. --------- Signed-off-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the items from issue #55 that fall inside this PR's file boundary,
plus the documentation half of issue #54 (the security-alert rail's scoping
logic is a separate change).
Fixed (issue #55)
initgains--known-agent-login <login...>(repeatable),mirroring
--reviewer. It writesknownAgentLoginsto config.json and theprinted summary now names the resulting list, since
AGENTS.mdcalls thisfield "the easy thing to forget."
pr_expedite/pr_approve_dep_upgrade(pi/src/extension.ts)now resolve a merge method when a call omits one and
autonomy: "auto"isgiven, instead of always falling through to the operations' own "merge"
default: an explicit per-call
mergeMethodstill wins outright, then a newper-repo
config.mergeMethodByReposetting, then a best-effort read of therepository's own allowed merge methods via a new, optional
GitHubGateway.getAllowedMergeMethods(implemented onOctokitGateway,added as an optional interface member so no existing fake gateway needs to
grow one). A repository restricted to squash-only or rebase-only merges no
longer 405s on every auto-merge attempt. The probe only runs when autonomy
is
"auto", so the common propose-only path gets no extra API call.discover.mjsscripts (pr-requester,pr-reviewer,pr-steward), and their byte-identical.pi/taskflowscopies, now warn onstderr when a
ghcall returns exactly the--limit 100cap, sinceghtruncates silently past it with no other signal.
runChecksis removed fromConfigSchema(core/model.ts) andfrom the docs (
docs/quick-start.md,docs/cli.md,SECURITY.md), ratherthan implemented: no non-test code path ever read it, which
SECURITY.mdalready admitted. Schemas regenerated via
npm run gen:schemasandcommitted.
SECURITY.mdkeeps a short note recording the removal instead ofsilently dropping the sentence.
pi/src/extension.tsnow memoizes the defaultOctokitGatewayper process (built at most once, lazily, on first use) via a small
once()helper, instead of the previous
deps.gh ?? (() => new OctokitGateway())building a brand-new client, with a cold ETag cache and no cached
authenticated login, on every single tool call. An injected
deps.gh(everytest, and any future caller with its own lifecycle) is unaffected.
docs/quick-start.mdnow says, next tocaptureMetadatain theconfig table, that the dashboard's Agents and Collaborators views need it on
for per-agent attribution, and what happens without it (a single "Unknown"
row).
Fixed (issue #54, documentation and setup half)
recommended scope, Dependabot alerts: read (fine-grained) /
security_events(classic), inSECURITY.md(new "Additional scope forexpedition auto mode" section) and
docs/quick-start.md.initnow makes one best-effort, read-only probe of the Dependabot alertsendpoint (against the first
--repoonly, since the permission is aproperty of the token, not of any one repository) and returns an unmissable
warning, printed to stderr surrounded by
!rules, when it cannot read thatendpoint. The probe is best-effort by construction: any thrown error is
treated the same as the gateway's own "cannot tell" (
null) result, so aprobe failure never fails
inititself. The wording is explicit that thispermission is unrelated to requesting, claiming, or completing a review, and
only gates the expedition taskflows'
autonomy=autopath.Explicitly left alone
expeditecannot widen past4000 lines for a human's own oversized dependency PR) and item 8
(
docs/taskflows.mdcorrections) both belong to the Silent stops: the flows stop needing a human without telling anyone #51 fix, whose filesoverlap another in-flight change. Not touched here.
changed packages rather than the whole repository) is explicitly out of
scope for this PR; only the documentation and the
initprobe are here.runChecks(docs/files-and-directories.md,docs/adr/0007-*.md,pi/skills/agent-review/SKILL.md,skills/orchestration.md,examples/config.json) were left as is; none of them break anything (zodstrips unknown keys by default), but a follow-up doc pass could clean them
up.
mcp/server.tsdoes not exposepr_expedite/pr_approve_dep_upgradeatall, so the merge-method fix in this PR is scoped to the pi adapter, which
is the only place those tools exist today.
Test plan
typecheck,typecheck:test,check:schemas,check:version,test(629 passed),buildall green.-w pi:typecheck,test(30 passed),buildall green.-w dashboard buildgreen.cd docs && npm run buildgreen.node --checkon each editeddiscover.mjs.init --known-agent-loginpassthrough and summary naming,the security-alerts probe (warns on null, warns on a thrown error but never
rejects, stays silent on a readable count, checks only the first repo), the
once()memoization primitive, and merge-method resolution (repositoryprobe, per-repo config precedence over the probe, explicit
mergeMethodwinning over both, and no probe at all in propose mode).
🤖 Generated with Claude Code