fix(rfc-025): add path/filepath + errors to Principle 9 quality gate
path/filepath bypasses core.Path() security boundary. errors bypasses core.NewError()/core.Is()/core.As(). Both now in the disallowed imports table. Validated by dogfooding core/go's own tests — zero filepath, zero errors imports remaining. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
2507f144a3
commit
4a5e5bbd1a
1 changed files with 2 additions and 1 deletions
|
|
@ -402,8 +402,9 @@ Core primitives become mechanical code review rules. An agent reviewing a diff c
|
|||
| `os/exec` | Bypasses Process primitive | `c.Process().Run()` |
|
||||
| `unsafe` | Bypasses Fs sandbox | `Fs.NewUnrestricted()` |
|
||||
| `encoding/json` | Bypasses Core serialisation | `core.JSONMarshal()` / `core.JSONUnmarshal()` |
|
||||
| `path/filepath` | Bypasses path security boundary | `core.Path()` / `core.JoinPath()` |
|
||||
| `fmt.Errorf` | Bypasses error primitive | `core.E()` |
|
||||
| `errors.New` | Bypasses error primitive | `core.E()` |
|
||||
| `errors` | Bypasses error primitive | `core.NewError()` / `core.Is()` / `core.As()` |
|
||||
| `log.*` | Bypasses logging | `core.Info()` / `c.Log()` |
|
||||
|
||||
**Rule:** If a diff introduces a disallowed import, it failed code review. The import list IS the quality gate. No subjective judgement needed — a weaker model can enforce this mechanically.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue