Skip to content

Resolve dead config branches (wire or remove) #4620

Description

@JSONbored

Context

Part of the review-stack architecture audit (parent epic — dead-code dimension). A dedicated sub-audit
scanned all ~99 boolean/enum fields in RepositorySettings; two have distinctly-declared, fully
settable values that no read site ever branches on (not self-documented as inert, unlike a separate
batch of already-known no-ops listed below).

High-confidence findings — need a decision (wire the behavior, or remove the dead value)

  1. AutonomyLevel"suggest" and "propose" values (src/types.ts:1258). Doc comment claims
    they "surface guidance/concrete proposals without executing" — distinct from "observe". Fully
    settable via API (src/api/routes.ts:758), .gittensory.yml
    (packages/gittensory-engine/src/focus-manifest.ts:1759), and DB round-trip. But every read site only
    distinguishes "auto"/"auto_with_approval" from everything else —
    isActingAutonomyLevel() (src/settings/autonomy.ts:30) and autonomyRequiresApproval() (:44) are
    the only two predicates ever used, and nothing anywhere does === "suggest" or === "propose".
    Setting autonomy: { merge: "suggest" } is behaviorally identical to leaving it unset.
  2. checkRunDetailLevel"deep" value (src/types.ts:684). DB parsing
    (src/db/repositories.ts:7311-7314) explicitly preserves "deep" as distinct from "standard". But
    both read sites — buildCheckRunAnnotations and formatCheckRunOutput
    (src/rules/advisory.ts:347,432) — only branch on detailLevel === "minimal"; "standard" and
    "deep" produce byte-identical output.

Batch — already self-documented as intentionally inert (lower priority, but adds config-surface noise)

gateCheckMode ("back-compat display only" — tracked in the separate config-surface-reduction issue,
don't duplicate work there), copycatGateMode ("CURRENTLY INERT... no detection engine reads it yet"),
firstTimeContributorGrace ("RESERVED... no runtime effect today"), autoProjectMilestoneMatch: "auto"
("behaves identically to suggest until #3185"), reviewCheckMode: "visible" ("behaves identically to
required"), qualityGateMode: "block" (downgraded to advisory at two separate layers),
ScreenshotTableGateAction: "advisory" ("a real no-op by construction"). Each of these was a deliberate,
documented choice at the time — worth a batch decision (wire them for real, or remove the unused values)
rather than individual issues.

This issue needs a decision before code changes

For each item: either (a) wire the documented-but-unimplemented behavior for real, or (b) remove the
dead enum value/branch and update the doc comment to say so. Pick per-item based on whether the feature
is still wanted — do not assume "remove" is always right.

Acceptance criteria

  • Decision recorded per item in the PR description.
  • AutonomyLevel.suggest/.propose and checkRunDetailLevel.deep either wired to real distinct
    behavior with a regression test, or removed with doc comments updated.
  • The self-documented-inert batch resolved the same way (wire or remove), reducing overall config
    surface either way.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions