Repository navigation
Commit 98a0439
committed
fix(review): Codex R18 review follow-ups — G2 audit guardrail + G6 copy
Independent code review by Codex (2026-07-21) surfaced two issues in
the R18 fixes:
1. G2 guardrail bug — `tierForced` was only set to `true` when the
forced tier value happened to DIFFER from the classifier's
decision. So `altimate-code review --force-tier=full` on a PR the
classifier would naturally rate `full` still runs the debug bypass
(silently exercises the flag path in orchestrate.ts) but emits an
envelope with no `tierForced`, no `tierClassified`, and no
"forced via" reason — breaking the audit-trail invariant we
documented in the R18 commit.
Fix: `tierForced = input.forceTier !== undefined`. Whenever the
caller passed the flag, the envelope now records the bypass
regardless of whether the forced value matched the natural one.
The leading reason string now also names the forced value.
Verified on js4 (naturally `full`): `--force-tier=full` now
produces `tierForced: true, tierClassified: "full", tierReasons:
["forced via --force-tier=full (classifier said full)", ...]`.
2. G6 cosmetic copy issue — the schema.yml test-removal detector's
body claimed "Removing a `unique` test on a mart-layer key is how
silent duplicate rows ship" for EVERY unique-test removal, even
when the schema.yml lives outside a mart layer (e.g. js2's
`models/schema.yml` sits at the top level, not under `models/marts/`).
Fix: detect the layer from the file path (`marts?` or `reporting`
→ "mart-layer"; otherwise "declared") and interpolate that into
the body. The finding is still accurate for genuine mart-layer
removals; the copy no longer misattributes for staging or
top-level schema files.
Neither change alters what findings are surfaced, only the audit
envelope shape (G2) and finding body prose (G6). No test-file
changes; smoke tests on js2 + js4 confirm both.1 parent e68d785 commit 98a0439
2 files changed
Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
913 | 918 | | |
914 | 919 | | |
915 | 920 | | |
| |||
921 | 926 | | |
922 | 927 | | |
923 | 928 | | |
924 | | - | |
| 929 | + | |
925 | 930 | | |
926 | 931 | | |
927 | 932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1101 | 1101 | | |
1102 | 1102 | | |
1103 | 1103 | | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
1108 | 1112 | | |
1109 | | - | |
| 1113 | + | |
1110 | 1114 | | |
1111 | | - | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
1112 | 1119 | | |
1113 | 1120 | | |
1114 | 1121 | | |
| |||
0 commit comments