You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(council): omit generated shell descriptions from review prompts - #181
Shell authorization now omits the generated description from Council review prompts when they already show the full command. The prompts retain the full command, justification, and requester-authored descriptions, including text identical to the fallback. Server-owned provenance stays in private intent state, so System One, OPA inputs, serialized intents, and writ binding retain their existing behavior.
Verification
475 tests passed across Council authorization and prompt rendering, structured tools, System One, OPA, and writs.
Ruff lint and formatting passed for all four changed files. Targeted mypy passed for the three changed production modules. Repository-wide mypy reported the same four Redis typing errors on the base and this branch.
Adversarial review
An independent reviewer exercised the registered authorization callbacks and gRPC proxy with in-process mocks. The review checked initial voting, debate, chairman, and packaged-file prompts, plus preservation of System One, OPA, and writ inputs. It also verified that a request cannot spoof the server-owned provenance flag.
The reviewer found that the original test fixture could miss command truncation at 80 characters. The revised regression test uses a longer command. All three cases pass for omitted, empty, and explicitly identical descriptions, and all three fail when the formatter is deliberately truncated. The review closed with no outstanding findings.
Summary by CodeRabbit
Bug Fixes
Reviewer prompts no longer show automatically generated shell descriptions when the requester leaves the description blank or omits it. Target resources remain visible.
Requester-provided descriptions continue to appear in reviewer prompts. Structured tool requests retain their description behavior, including displaying generated fallback text when applicable.
Authorization continues to receive the generated shell fallback description.
No actionable comments were generated in the recent review.
Walkthrough
Authorization now tracks when a shell description is generated as a fallback. Council review prompts omit that description while retaining the command and other intent fields. Tests cover shell and structured-tool authorization prompts with supplied and fallback descriptions.
Intent gains a private flag for shell-description fallback provenance. Authorization sets the flag when a shell request has no supplied description.
Render descriptions in review prompts nomos/llm/council_agent.py, tests/test_nat_functions.py
Council omits the description when a command is present and the flag marks it as generated. Tests cover shell and structured-tool prompts with empty, omitted, and explicit descriptions.
This change hides generated shell description fallbacks from Council review prompts. Requester-written descriptions, the command, and policy inputs remain unchanged. No actionable merge-blocking risk was found.
Security architecture risk: Minimal · up to 3f067
The change removes a redundant, shortened copy of the command from the review. Reviewers still see the full command, its target, the reason for the request when provided, and any description supplied by the requester. The change leaves policy checks and the binding between an approval and the authorized action intact.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The changed presentation can affect Council decisions for shell authorization requests with omitted or empty descriptions. The delta adds no route to another Council, target, or execution capability. Requests that supply a description and structured tool requests do not take the omission branch.
Trust Boundaries and Controls
observed — The requester controls the command, description, and justification, but does not set the provenance marker. The server derives it after the existing identity checks. Its use is limited to omitting the generated description line; the formatter retains the full command, target resource, working directory, and supplied justification.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title uses the Conventional Commits format with the allowed type 'fix' and scope '(council)', lowercase throughout, no trailing period, and 67 characters. It clearly describes the main change: the…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title uses the Conventional Commits format with the allowed type 'fix' and scope '(council)', lowercase throughout, no trailing period, and 67 characters. It clearly describes the main change: the Council review prompt omits server-generated shell descriptions when the full command is present, which matches the raw summary and PR objectives.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between af2d980 and 3f06757.
Files selected for processing: 4
nomos/level_0/types/intent.py
nomos/llm/council_agent.py
nomos/nat/functions.py
tests/test_nat_functions.py
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
Recent review details
Context from checks skipped due to timeout: 3
GitHub Check: Unit tests
GitHub Check: CodeRabbit
GitHub Check: OPA policy tests
Additional context used
Code guidelines: 1
.agents/architecture.md — configured
Path-based instructions: 5
Core library, organized into layered levels (level_0..level_4) plus auth, crypto, opa, store, mcp, grpc, and llm subsystems.
CodeRabbit configuration file
Files:
nomos/level_0/types/intent.py
nomos/llm/council_agent.py
nomos/nat/functions.py
Tests are mandatory for behavior changes and should cover failure paths, not only happy paths.
CodeRabbit configuration file
Files:
tests/test_nat_functions.py
Every hand-authored source and configuration file must begin with the Apache-2.0 header: an SPDX-FileCopyrightText copyright line followed by SPDX-License-Identifier: Apache-2.0.
CodeRabbit configuration file
Files:
nomos/level_0/types/intent.py
nomos/llm/council_agent.py
nomos/nat/functions.py
tests/test_nat_functions.py
Source excerpt: Current architectural intent: `nomos/nat`, `nomos/grpc`: ingress and adapter layers.
[info] 1028-1028: Do not hardcode temporary file or directory names
Context: "/tmp"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
[info] 1217-1217: Do not hardcode temporary file or directory names
Context: "/tmp"
Note: [CWE-377] Insecure Temporary File.
(hardcoded-tmp-file)
Additional comments: 4
nomos/level_0/types/intent.py: 1
164-165: LGTM!
nomos/nat/functions.py: 1
4499-4500: LGTM!
nomos/llm/council_agent.py: 1
373-375: LGTM!
tests/test_nat_functions.py: 1
1[REDACTED]5-1044: LGTM!
Also applies to: 1154-1157, 1172-1172, 1201-1202, 1205-1224
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
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
Tracks NOMOS-106.
Shell authorization now omits the generated description from Council review prompts when they already show the full command. The prompts retain the full command, justification, and requester-authored descriptions, including text identical to the fallback. Server-owned provenance stays in private intent state, so System One, OPA inputs, serialized intents, and writ binding retain their existing behavior.
Verification
Adversarial review
Summary by CodeRabbit