feat(agent): autonomy-levels framework (#773) - #840
Merged
Conversation
The first Wave-2 / Phase-0 piece: a graduated autonomy dial the whole agent layer reads before acting. Deny-by-default. - AutonomyLevel (observe -> suggest -> propose -> auto_with_approval -> auto) + AgentActionClass (review/request_changes/approve/merge/close/ label) + AutonomyPolicy (per-action-class map) types. - src/settings/autonomy.ts: resolveAutonomy(autonomy, actionClass) — THE single gate the action layer (#778) consults; returns 'observe' for any unset/malformed class (deny-by-default). Plus isActingAutonomyLevel, autonomyRequiresApproval, normalizeAutonomyPolicy. Pure + 100% covered. - Persisted on repository_settings as a JSON map (migration 0042, default '{}' = deny-by-default), mirroring commandAuthorization; parsed + resolved through the existing yml > DB > defaults resolver. Resolvable from .gittensory.yml via the settings: block (a malformed block never blanks the DB-configured policy). Surfaced in the GET /settings OpenAPI shape. The richer autoMaintain config block (merge/close policy, requireApprovals) + dashboard write are #774; the action layer that consults resolveAutonomy is #778. NOTE: migration 0042 is also used by the open #833 (reviewer-routing) — whichever merges second rebases + renumbers.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | ca6691e | Commit Preview URL Branch Preview URL |
Jun 17 2026, 09:15 PM |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #840 +/- ##
=======================================
Coverage 96.58% 96.58%
=======================================
Files 98 99 +1
Lines 14196 14215 +19
Branches 5172 5178 +6
=======================================
+ Hits 13711 13730 +19
Misses 105 105
Partials 380 380 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closed
12 tasks
This was referenced Jul 2, 2026
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.




Closes #773. The first Wave 2 / agent-layer (Phase 0) piece — the deny-by-default dial everything else reads before acting.
What
AutonomyLevel(observe → suggest → propose → auto_with_approval → auto) +AgentActionClass(review/request_changes/approve/merge/close/label) +AutonomyPolicy(per-action-class map).src/settings/autonomy.ts—resolveAutonomy(autonomy, actionClass): the single gate the action layer (feat(agent): maintainer write-actions layer (request-changes/approve/merge/close/label) #778) consults before any write action. Returnsobservefor any unset or malformed class (deny-by-default). PlusisActingAutonomyLevel,autonomyRequiresApproval,normalizeAutonomyPolicy. Pure + 100% covered.repository_settingsas a JSON map (migration 0042, default'{}'), mirroringcommandAuthorization; parsed + resolved through the existing yml > DB > defaults resolver. Settable from.gittensory.ymlvia thesettings:block (a malformed block never blanks the DB-configured policy). Surfaced in theGET /settingsOpenAPI shape.Scope boundary
This establishes the dial + the gate + persistence. The richer
autoMaintainconfig block (merge/close policy,requireApprovals) + dashboard write are #774; the action layer that consultsresolveAutonomyis #778. Nothing here takes any action — it's pure config + a resolver.Verification
typecheck clean · migration guard (0001..0042, no dup) · full suite 2009 passed, 1 skipped (pre-existing pngjs visual-agent skip) · OpenAPI regenerated + drift-clean · UI lint clean · the new module is 100% covered and every changed wiring line is covered.
Relates #768 (Phase 0), #774 (autoMaintain config builds on this), #778 (write-actions consume
resolveAutonomy).