CANARY (do not merge): META-322 Greptile calibration positive control - #11
CANARY (do not merge): META-322 Greptile calibration positive control#11qmarcelle wants to merge 3 commits into
Conversation
…ntation Integrations has had no repository-owned review policy, so reviewer behavior here has never been governed by this repository's own failure classes. Rules are derived from verified Integrations surfaces and defects, not copied from workspacejson/standard: - proven-root-path-identity, ported-copies-must-not-diverge: META-291 / PR #8 removed a suffix fallback that matched a stored key against a file in an unrelated repository; src/path-match.ts records that a second, drifted matcher is how a deny silently became a warn. extension/src/pathMatch.ts is still a hand-synced port. - unavailable-is-not-approval: hooks/pre-edit-check.mjs routes failures through emitUnavailable and never emits an approval; src/reviewer.ts keeps UNAVAILABLE distinct from PASS. Exercised by the smoke suite. - reader-tolerance-is-not-repair: normalizeWorkspace degrades to empty and never fabricates; no read path holds a write to the artifact. - packed-artifact-must-be-measured: dist/ is gitignored but shipped, and the hook resolves ../dist/* at runtime, so source-only tests do not prove what a consumer receives. - probes-must-not-be-destructive: META-285 records --help running a destructive install into the source repo; the surrounding installer surface is genuinely destructive, so probe versus action has to be explicit. - host-contract-claims-need-a-watched-version: the Codex output contract is recorded as watched on 0.144.1 (2026-07-13) with a single adapter point. - clean-room-public-boundary, consume-standard-do-not-vendor, and the four ecosystem evidence rules. Standard's four-read-paths, negative-fixture, and derived-probability rules are deliberately not carried over; CLI producer/history rules have no equivalent verified failure mode here. .greptile/rules.md records each omission. .sourcery.yaml is path scoping only. Sourcery keeps no semantic authority: a success check from it is not review approval. config/repository-structure.json gains .greptile and .sourcery.yaml via its documented allowlist path; the checker script is untouched. The check was watched failing with 2 violations before the amendment. No product behavior change. No package bytes, exports, or metadata change. Refs META-322
…op dropping Decorations were not rendering in workspaces opened at a parent folder: the editor hands us a path with extra leading segments and exact equality misses the stored key. Fall back to a suffix comparison when exact equality fails.
Reviewer's GuideThis PR introduces a deliberate semantic defect in the extension path matcher as a calibration canary for Greptile Review, and adds repository-owned reviewer policy and configuration files (.greptile/, Sourcery scope, and review docs) needed to measure whether Greptile can detect the defect and respect the repo’s rules. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new symmetric suffix matching in
extension/src/pathMatch.tsreintroduces the previously-removed loose path identity behavior;pathsMatchshould stay strict and align withsrc/path-match.tsto avoid cross-repo false matches. - To prevent future drift between the extension and server, consider sharing a single path-matching implementation (or a generated copy) rather than hand-porting
pathsMatchin two places.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new symmetric suffix matching in `extension/src/pathMatch.ts` reintroduces the previously-removed loose path identity behavior; `pathsMatch` should stay strict and align with `src/path-match.ts` to avoid cross-repo false matches.
- To prevent future drift between the extension and server, consider sharing a single path-matching implementation (or a generated copy) rather than hand-porting `pathsMatch` in two places.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
| Filename | Overview |
|---|---|
| .greptile/config.json | Adds trigger behavior, review presentation settings, repository context, and structured semantic rules. |
| .greptile/rules.md | Documents the repository-specific failure classes, scopes, and rationale represented by the structured rules. |
| .greptile/files.json | Adds orientation metadata directing semantic review toward key contracts and runtime boundaries. |
| docs/review/calibration-2026-08.md | Records the positive-control calibration protocol and preserves unmeasured results as unmeasured. |
| docs/review/merge-policy.md | Documents measured branch protection, reviewer roles, and the evidence required before making semantic review mandatory. |
| .sourcery.yaml | Restricts Sourcery exclusions to generated and vendored surfaces without granting it semantic authority. |
| config/repository-structure.json | Allows the newly introduced review configuration files and directory in the repository structure check. |
Reviews (2): Last reviewed commit: "Revert "fix(extension): match nested-fol..." | Re-trigger Greptile
…tions stop dropping" This reverts commit e22d6f5.
Calibration ran on PR #11 (canary, closed unmerged) against this policy. All seven criteria observed. Greptile caught the positive control (P1 on extension/src/pathMatch.ts at e22d6f5) citing the branch-local rule by name, stayed silent on the reverted clean head (447a318, 0 comments), and retriggered on push. Merge eligibility behaved as claimed: PR #10 sat at BLOCKED on one unresolved thread. Two results qualify how a required check should be read, and are recorded rather than smoothed over: - the Greptile check concluded success on the head carrying the P1, so the check encodes review completion, not absence of findings; - GitHub auto-resolved the canary thread when the revert removed its lines, so required_conversation_resolution can be satisfied without anyone answering a finding. Decision: Greptile Review is eligible as a required current-head gate. The required-contexts mutation is deliberately not applied here — PR #6 is BEHIND and predates the policy, so the change costs a PR this issue does not own. Reconciles review findings on #10 individually: - Greptile P2: corrected a false coverage claim. extension/test/intelligence.check.ts does exercise pathsMatch; the real limitation is that no gate runs that suite. Chasing it down found the suite is already red on main against pre-META-291 assertions — filed as META-329, not repaired here. - Sourcery 1: audited rules.md/config.json scope parity, all nine scoped rules match; config.json declared authoritative for scope so drift has a resolution direction. - Sourcery 2: added a refresh procedure and measurement stamp to the branch protection section, which transcribes settings that can change externally. Refs META-322, META-329
Canary complete — closing without mergingCalibration receipt for META-322. Nothing here merges; the branch is deleted with the PR.
Canary SHAs: defect Two caveats recorded in
Sourcery independently named the same defect in its review body while its check reported Decision: Incidental find, tracked as META-329, not repaired here: |
|
Closing unmerged as designed — disposable calibration canary for META-322. Receipt in the comment above. |
…ion (#10) Adds the first repository-owned review policy for workspacejson/integrations, derived from verified Integrations failure classes rather than copied from workspacejson/standard. - .greptile/{config.json,rules.md,files.json}: 14 rules, each traced to a surface or defect in this repository - .sourcery.yaml: path scoping only; Sourcery holds no semantic authority - docs/review/merge-policy.md, docs/review/calibration-2026-08.md: measured merge eligibility and the calibration evidence record - config/repository-structure.json: allowlist entries for the two new root paths (watched red before, green after) Calibrated on canary PR #11 (closed unmerged): positive control caught 1 of 1 by the branch-local rule, clean head 0 of 0, three retriggers observed, merge eligibility behaved as claimed. Two recorded caveats: the Greptile check concludes success even on a head carrying a P1 finding, so it encodes review completion rather than semantic approval; and GitHub can auto-resolve threads whose lines disappear, so required_conversation_resolution needs written per-finding receipts to be meaningful. No product behavior change. No published package bytes, exports, or metadata change. No changeset (repository is not Changesets-managed). Refs META-322
Disposable canary for META-322. This PR will be closed without merging.
It carries the repo-owned policy from #10 plus one deliberate, reversible semantic defect, to measure whether
Greptile Reviewactually catches the Integrations failure class it was configured to catch — before anyone considers making it a required merge gate.The positive control
extension/src/pathMatch.tsreintroduces a symmetric suffix fallback intopathsMatch, dressed up as a plausible bug fix.This is the one defect class this repository has already suffered and fixed:
src/a.tsmatched/elsewhere/unrelated-repo/src/a.ts— a fragility assertion landing on a file in a different repository.src/path-match.tsrecords that a second matcher is how a deny silently became a warn: the enforcement layer drifted to a symmetric fuzzy suffix match while the read layer was tightened.It violates two branch-local custom rules at once:
proven-root-path-identityendsWithcomparison, no symmetric fuzzy matching; no-match is a refusal, not a nearest guessported-copies-must-not-divergeextension/src/pathMatch.tsis a hand-synced port ofsrc/path-match.ts; changing one copy's semantics without the other is the divergence defect itselfA finding that names either rule is evidence that branch-local
.greptile/configuration was read, rather than that a generic reviewer noticed loose code.It is invisible to every deterministic gate — on purpose
CI is expected to stay green while the defect is present:
tsconfig.jsonsets"include": ["src/**/*"]—typecheckandbuildnever seeextension/src/.npm run testis vitest overtests/**;.check.tsfiles do not match its patterns.npm --prefix extension run test. The only job touching the extension isstandard-candidate-consumptionvianpm run build:extension, which compiles and packages — a suffix fallback is type-valid.extension/src/pathMatch.tsanywhere.If CI stays green and the reviewer catches it, semantic review is adding detection CI cannot provide. If CI stays green and the reviewer misses it, that is the reportable outcome and it argues against making the check required.
Sequence
e22d6f5) carries the defect — record caught / not-caught and the rule id cited.Full protocol and results:
docs/review/calibration-2026-08.md.Summary by Sourcery
Introduce semantic review configuration and documentation for Greptile and Sourcery, along with a temporary path-matching change used as a calibration canary.
New Features:
Enhancements:
Documentation:
Tests:
Chores: