Repository navigation
feat: derive classification signals from docs for external analyzers - #291
Conversation
|
🤖 Finished Review · ✅ Success · Started 3:16 PM UTC · Completed 3:35 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $14.27 |
|
Risk Assessment: elevated (3/5) DetailsElevated risk driven primarily by large change size (2762 lines across 28 files) and moderate test ratio (0.21). Risk is mitigated by well-scoped issue with clear design rationale, strong spec artifacts, explicit scope boundary keeping Go-native path untouched, and self-contained new package with comprehensive test suite. |
ReviewFindingsMedium
Low
|
01b454d to
9d8af6e
Compare
Addresses PR unbound-force#291 review feedback from @fullsend-ai-review[bot]. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
|
Thanks for the review. Resolution of the four findings: Medium Low Low Low |
Addresses PR unbound-force#291 review feedback from @fullsend-ai-review[bot]. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
2b62525 to
c5b5eac
Compare
- Add internal/adapter/docsignal package: annotation grammar, sidecar overrides, and doc-signal derivation - Wire doc signals into adapter.mergeClassifications - Add --no-classify-signals and --unclassified-effect flags to the fake analyzer for independent doc-signal path testing - Document the grammar, sidecar, and weights in docs/ Closes unbound-force#285 Assisted-by: deepseek-v4-pro Generated with AI assistance (deepseek-v4-pro)
Addresses PR unbound-force#291 review feedback from @fullsend-ai-review[bot]. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
c5b5eac to
deb2c5b
Compare
jflowers
left a comment
There was a problem hiding this comment.
Note: Could not post as APPROVE due to insufficient permissions (self-review prohibition). Posted as COMMENT instead. Original verdict: APPROVE.
LGTM. Clean, well-scoped implementation of doc → classification signal derivation for external analyzers.
Verified locally:
- go build ./... — PASS
- go test -race -count=1 -short ./... — PASS (20/20 packages)
- golangci-lint run ./internal/adapter/... ./internal/protocol/... — PASS (0 issues)
Notes:
- Strictly scoped to external analyzers; Go-native godoc path unchanged.
- 12-scenario ratchet test plus E2E doc-signal-only integration test.
- Sidecar (YAML/JSON) parsing uses standard unmarshalers with semantic validation and graceful degradation.
- No security or alignment findings.
This review was generated by /uf.review-pr (AI-assisted).
Summary
External-analyzer projects (e.g., Python via snake-eyes) report a large
share of detected side effects as
ambiguous(56.7% for snake-eyes)despite their spec/design docs already documenting which effects are
contractual vs. incidental.
gaze docscanalready discovers those docs,but that output never reaches classification.
This change adds a doc → signal derivation step so documented contracts
and documented internal bookkeeping drive classification:
(
<!-- gaze:contractual TypeName -->and> [!gaze-contract]fencedblocks) to declare effects contractual/incidental, keyed by the
analyzer's effect-type name.
.uf/gaze/contracts.yaml/.json) forexplicit
(package, function, side_effect_type) → labeloverrides.internal/adapter/docsignal/package producing[]docsignal.DerivedSignal(a keyed carrier;taxonomy.Signalunchanged), fanning type-level annotations out to per-function tuples
via the effect list.
adapter.mergeClassificationsso doc signals flow throughclassify.ComputeScorewith no protocol changes.Strictly scoped to external analyzers; the Go-native
godocpath isunchanged.
closes #285
How to Test
How to Demo
In an external-analyzer project, add
<!-- gaze:contractual ContainerMutation -->to a.mddoc (or a.uf/gaze/contracts.yamlentry), then rungaze quality --analyzer <name>.Effects documented as contractual/incidental resolve from
ambiguousinstead of remaining ambiguous.
Key Files Changed
internal/adapter/docsignal/(new) — grammar, parser, sidecar loader,derivation, plus 19 unit tests and a 12-scenario coverage ratchet.
internal/adapter/classify.go/sideeffect.go— merge doc signals intoclassification; unconditional derivation.
internal/protocol/testdata/fake_analyzer/main.go—--no-classify-signalsand
--unclassified-effectflags for independent doc-signal testing.docs/— newguides/doc-annotations.mdplus updates toconcepts/classification, reference/configuration, guides/improving-scores,
and index.
This PR was generated by /uf.finale (AI-assisted).