feat(safety-profile): lock boolean policy flags - #979
Conversation
…ofile can fix output settings the command line cannot change
… the locked variants to the read path
… which flags not to lock
…erator output; rebuild locked names per parse
…locked json or plain wins over the competing mode
… a locked one, override only environment defaults
…s that match nothing, and refuse locks on --home or required flags
Co-authored-by: Ronny Rentner <github@ronny-rentner.de>
Co-authored-by: Ronny Rentner <github@ronny-rentner.de>
Co-authored-by: Ronny Rentner <github@ronny-rentner.de>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 10:52 PM ET / August 11, 2026, 02:52 UTC. ClawSweeper reviewWhat this changesAdds an opt-in Merge readinessKeep open: current main has no locked-flag profile capability, and this collaborator-authored PR adds a new safety-policy contract that needs explicit product sponsorship before merge. The patch is otherwise technically sound on review. Priority: P2 Review scores
Verification
How this fits togethergog parses CLI arguments and ambient defaults into command settings before enforcing its baked safety profile. This change adds a policy step that injects locked boolean values and rejects overrides before the selected Google Workspace command runs. flowchart LR
A[CLI arguments] --> C[Argument parser]
B[Environment and config defaults] --> C
C --> D[Baked safety profile]
D --> E[Locked flag enforcement]
E --> F[Output-mode resolution]
F --> G[Command execution]
Decision needed
Why: This adds a durable configuration and behavior surface rather than repairing an established contract; VISION.md asks for discussion before behavior changes that could affect scripts. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt an opt-in, boolean-only Do we have a high-confidence way to reproduce the issue? Not applicable: this PR introduces a new baked-profile capability rather than reporting a broken existing behavior. The PR body supplies built-binary after-fix terminal evidence for its intended policy behavior. Is this the best way to solve the issue? Yes, conditional on product sponsorship: boolean-only locks provide a narrow, maintainable implementation without changing existing stock or custom profiles that omit the new mapping. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against be676a25fbc6. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Lands #976 with maintainer hardening on top of @ronny-rentner's work. His
commits are preserved as authored; the additional commits narrow the design
after adversarial review found real bypasses in the generic form:
bool/int/string locking was unsafe to guarantee: non-boolean flags have too
many injection shapes to enforce a lock honestly.
GOG_AUTO_JSON=1overrode a locked--json. Environment variables now onlysupply defaults; they never override a lock.
locks on
--homeand required flags. Output-mode precedence resolves afterlocks so a locked
json/plainbeats a competing mode.output; docs and changelog updated.
Enforcement proof from the built binary:
make test,make lint(0 issues), andmake docs-check(709 command pages)all pass.
Closes #976. Thanks @ronny-rentner — the feature concept and the core
implementation are yours; the hardening keeps its promise enforceable.