Skip to content

feat(automation): bounded-automation candidate layer (Arc D phase 1)#43

Merged
saagpatel merged 1 commit into
mainfrom
arc-d1-automation-candidates
Jun 6, 2026
Merged

feat(automation): bounded-automation candidate layer (Arc D phase 1)#43
saagpatel merged 1 commit into
mainfrom
arc-d1-automation-candidates

Conversation

@saagpatel

Copy link
Copy Markdown
Owner

Arc D — Phase 1 of 3: advisory candidate layer (read-only)

First rung of the Arc D safe-automation ladder. Strictly advisory — opens no PRs, applies nothing.

What

  • New src/portfolio_automation.py:
    • evaluate_automation_eligibility(project, *, decision_quality_status)AutomationEligibility(eligible, blockers). Blockers accumulate so the operator sees every reason a repo is held back.
    • select_automation_candidates(truth, *, decision_quality_status) → sorted, capped list of AutomationCandidate.
  • The trust bar (operator-approved): portfolio decision_quality_status == "trusted" AND repo path_confidence == "high" AND registry_status ∈ {active, candidate} AND context_quality ∈ {minimum-viable, standard, full}.
  • Wired an automation_candidates section into the weekly command-center digest + markdown.

Safety

  • No write authority added. The digest's report-only guardrail is unchanged.
  • The portfolio decision_quality gate means: when calibration is noisy/mixed/insufficient, zero repos are eligible.
  • decision_quality_status is sourced once (normalized to insufficient-data) so the displayed status and the gate can never diverge (/code-review finding, applied).

Tests / gates

  • 24 new tests (tests/test_portfolio_automation.py): every blocker, accumulation, selection/sort/cap, missing-identity safety, digest integration (trusted → surfaced, not-trusted → empty).
  • Full suite 2341 passed, 2 skipped. ruff check . clean. /code-review run, findings applied.

Next: phase 2 (durable proposal queue + real approval gate), phase 3 (gated executor + auto-PR with dry-run/never-main/skip-dirty rails).

…rc D phase 1)

Add src/portfolio_automation.py: a strictly read-only trust-bar predicate
(evaluate_automation_eligibility) and candidate selector
(select_automation_candidates). A repo clears the bar only when the portfolio
decision_quality_status is 'trusted' AND the repo has high path confidence, an
active/candidate registry status, and non-trivial context quality. Blockers
accumulate so the operator sees every reason a repo is held back.

Surface the eligible cohort as an automation_candidates section in the weekly
command-center digest + markdown. No proposals are created and nothing is
applied; proposal creation (phase 2) and gated execution (phase 3) build on
this signal layer. The report-only guardrail is unchanged.

24 new tests. Full suite 2341 passed, ruff clean.
@saagpatel
saagpatel merged commit ce06455 into main Jun 6, 2026
2 checks passed
@saagpatel
saagpatel deleted the arc-d1-automation-candidates branch June 6, 2026 09:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ecc499ee86

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# creation, execution re-checks) reuse the exact same gate.
TRUSTED_DECISION_QUALITY = "trusted"
ELIGIBLE_PATH_CONFIDENCE = frozenset({"high"})
ELIGIBLE_REGISTRY_STATUS = frozenset({"active", "candidate"})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the schema's recent registry status

For snapshots produced by this repo, derived.registry_status is validated against {"active", "recent", "parked", "archived"} in src/portfolio_truth_types.py and _registry_status_for() returns the activity status except mapping stale to parked, so no valid portfolio-truth project can have "candidate". As written, a recent repo that otherwise clears decision quality, high path confidence, and usable context is always blocked as registry-status-not-eligible, so the digest silently omits eligible recent projects.

Useful? React with 👍 / 👎.

Comment on lines +74 to +78

``decision_quality_status`` is the portfolio-level value (the same for every
repo in a run); the remaining checks are per-repo. Blockers accumulate so
the operator sees every reason a repo is held back, not just the first.
"""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep candidates behind the existing opt-in

This marks a repo eligible using only derived path/context/status fields, but the existing automation trust bar in src/auto_apply.py requires declared.automation_eligible and baseline risk before any repo can receive automated writes. Because catalog entries default automation_eligible to false, a trusted run with an active, high-confidence, standard-context repo that has not opted in (or has elevated risk) will still be listed under “Automation Candidates,” giving the operator a candidate that later automation phases must reject.

Useful? React with 👍 / 👎.

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