Replies: 1 comment
|
ADR draft is up for the four questions above:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Examining production review pipelines (notably Alibaba's open-code-review), three deterministic mechanisms fit fabrika's contract-first architecture and address concrete noise, token overhead, and path-specific precision in
fabrika:review:Deterministic Diff Filtering (Noise Exclusion)
pnpm-lock.yaml), snapshot files, and generated artifacts.pnpm-lock.yaml, lockfile churn), test snapshots (__snapshots__/**), and generated schema/build outputs. Repositories can extend freely via.fabrika.jsonc; removals of defaults are permitted but explicitly enumerated in scope output (un-excluded: pnpm-lock.yaml by repo config) to maintain visibility.touchesGovernanceRoot,lane provenamespace derivation, portability-guard triggers,ship scope) must read the raw path list so filtering cannot dodge gates (e.g.packages/fabrika-cli/src/is a portability trigger but not agovernedRoot; filteringpackages/**must never bypass the guard).review diff, preview) read the filtered path list.governedRoots ∪ guard trigger trees.pnpm-lock.yaml. How they resolve hinges on placement:UNKNOWN/park or inventing a new terminal state, scope emits anexcludedrow following the existingroutedpattern.review diffmust clearly distinguish deliberately excluded paths from accidentally truncated reads via a machine-readable excluded-paths header.Pre-Flight Inspection (
fabrika review preview)$pr --sha) and range arms (--base/--tip) for parity with existing review verbs.previewreports matched and excluded files; rule fragment output remains empty until d1-direct: defer DOs and workflows #3 lands.Path-to-Rule Subsystem Matching
apps/web/worker/**Effect/runtime vsapps/web/client/**React)..fabrika.jsonc(via generated fragments inpackages/fabrika-cli/src/config/keys/, noting this will fire the governance skill).review scoperesolves matching fragments deterministically alongside namespace rows.code,doc,skill,ui).(Related, out-of-scope note: A prompt reflection pass re-quoting offending lines before
review postis high-ROI precision work, but lives purely in skill text without requiring a CLI contract.)Measured locally (ocr-port benchmark, 2026-09-13)
Measured motivation. We classified every merged PR from the last six months by changed-file paths (n=2,852). Exactly two are dependency-only; zero touch only
pnpm-lock.yaml; the default exclusion set matches content on 1 of 9 sampled PRs. With the exclusion scaffold trimmed (zero-exclusion runs drop the scope-rows block), the filter is strictly non-negative: unchanged (a fixed +43-token header, under half a percent of prompt even on the smallest PR) on the eight PRs with nothing to exclude, -804 tokens on the one PR that carried a lockfile hunk -- -460 tokens net across the nine-PR sample (o200k_base, exact counts). The token case is roughly neutral and we are not claiming it.The case that survives is semantic, not economic. (a) The one excludable hunk was real noise the reviewer read as code context. (b) The dependency-PR question is real regardless of token counts: both dep-only PRs in the frame have no verifiable acceptance-criteria block, and the before/after fork decides what a contract-less, all-excluded diff means to the merge gate -- zero namespaces (nothing to review) versus namespace rows beside a deliberate-exclusion enumeration (something was there, and was excluded on purpose, distinct from truncation).
Verdicts are proxies from a simulated reviewer (skill text + diff, no CI/governance arms). They are single samples with no error bars; on eight of nine PRs the reviewed input is byte-identical across arms, so any verdict cell there is harness variance, not filter effect (observed: one clean PRs defect flag flipped between two runs on identical input). Verdicts stay out of the table below; the one filter-attributable data point (#535: defect flagged under both placements) is stated in prose.
Sample stated plainly: n=9, confirmed-defect n=2, dep-only n=0. The safety claim is "zero new false negatives" and it is weakly powered -- on eight PRs the inputs are unchanged so no filter effect is possible; on #535 the input changed and the defect flag held in both placements.
One consistency note: on the eight zero-exclusion PRs the A and B token columns are identical, whereas an earlier untrimmed run differed by one token everywhere. Expected -- the only content difference between placements is the placement marker inside the exclusion scaffold, and that scaffold is dropped when nothing is excluded; the markers one-token difference reappears on #535, where the scaffold is present.
Key Decisions for Maintainers
excludedrow)?excludedScope Row: Conditional on Branch B being preferred above; confirmation on adopting therouted-styleexcludedrow over introducing any new terminal state.governedRootsonly. The draft asserted the filter must refuse any exclusion pattern intersectinggovernedRoots ∪ guard trigger trees. The benchmark measured that union misfiring on its own motivating population: on real dep-only PR fix(epic-ledger): drop publishConfig.provenance:true (redundant under OIDC, breaks non-CI publish) #399, excluding a package.json glob refused at exit 17 because it grazed catalog-guards corpus -- blocking a legitimate policy choice about review scope, on the exact PR class the filter exists to serve. To be explicit: the package.json glob was a probe of the refusal path, not a proposed default -- the proposed default excludes remain lockfiles, snapshots, and generated artifacts. Guards dont need this protection: they read the raw path list (the consumer split), so a review-side exclusion cannot blind them, and narrowing therefore adds no risk. We recommend the union narrow togovernedRootsonly, with the guard trees kept documented and drift-loud by a golden test. The narrowed union also makes the fork observable on a real PR: fix(epic-ledger): drop publishConfig.provenance:true (redundant under OIDC, breaks non-CI publish) #399 with the pattern accepted becomes all-excluded, and the two placements demonstrably diverge -- Branch A derives zero namespaces, Branch B keepsnamespace review-codebesideexcluded 1 -- packages/epic-ledger/package.json.All reactions