Release 1.8.0: owner attribution, abstention transparency, and self-update - #20
Merged
Merged
Conversation
Add a shared Lang-parameterized adapter (src/evidence/owners/c_cpp.rs) wired into the owner-only dispatch, extending 1.6.0 owner attribution to C and C++ discover --match any --as text hits. - C: ANSI function definitions; K&R-style definitions abstain. - C++: namespace/class qualification (ns::Class::method), out-of-line qualified declarators, transparent templates, lambda barriers, type-less ctor/dtor gate bound to lexical classes (never namespaces). - Fail-closed: every failed or abstained function identity emits a full-range anonymous barrier before descending, so macro-generated (e.g. TEST(...)) and malformed definitions cannot leak nested owners; qualified identifiers with direct ERROR/missing children abstain. - Anti-drift manifests pin bundled C/C++ grammar NODE_TYPES fingerprints. - Call appendix remains Go-only; C/C++ files never enter call-edge analysis. US-072. Spec by Biscuit, implementation by Bella, code review by Biscuit (v1 rejected with 2 P1 fail-closed leaks, v2 approved), final gate by Milo.
Add a Ruby adapter (src/evidence/owners/ruby.rs) wired into the owner-only dispatch, extending owner attribution to Ruby discover --match any --as text hits (US-072 wave 2). - Named owners from grammar method/singleton_method nodes only; display distinguishes instance (A::B#m) from singleton (A::B.m). - Qualified class/module paths are authoritative: longest lexical-suffix/qualified-prefix witness merges (module A + class A::B -> A::B); disjoint composition barriers instead of fabricating unprovable owners (Ruby Module.nesting resolution cannot be proven from single-file syntax, unlike C++'s enclosing-namespace constraint); leading :: is absolute and replaces the lexical stack. - class << self supports one singleton level with state reset on named-container entry; higher-order eigenclass forms barrier. - Ordinary blocks/procs/lambdas are transparent to the enclosing method; 13 dynamic metaprogramming constructs (define_method, define_singleton_method, eval/exec families, alias forms, attr_* accessors) are full barriers and never named owners. - Fail-closed: every identity-fail or error-degraded path emits a full-range anonymous barrier before descending. - Anti-drift manifest pins the bundled Ruby NODE_TYPES fingerprint. - Call appendix remains Go-only; C/C++ wave 1 (4ace457) unchanged. US-072 wave 2. Spec by Biscuit, implementation by Bella, code review by Biscuit (v1 rejected with P1 fabricated-qualification + P2 absolute-path gap, v2 approved), disjoint-composition arbitration and final gate by Milo.
Greptile SummaryThe PR extends structural owner attribution to C, C++, and Ruby, adds typed owner-abstention reporting, and introduces installation-aware self-update support.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the prior C++ call-operator attribution issue is covered for inline, const, out-of-line, and namespace-qualified definitions.
|
| Filename | Overview |
|---|---|
| src/evidence/owners/c_cpp.rs | Adds fail-closed C/C++ owner attribution and correctly repairs the previously reported operator() ownership gap with focused coverage. |
| src/evidence/owners/ruby.rs | Adds qualified Ruby owner attribution with explicit barriers for dynamic and structurally unprovable constructs. |
| src/evidence/owners/mod.rs | Introduces shared typed owner decisions and routes the expanded language set through the attribution seam. |
| src/commands/find.rs | Integrates bounded per-file abstention reporting into text-OR discovery output. |
| src/update.rs | Implements installation-aware update resolution, integrity verification, transactional replacement, and rollback behavior. |
| src/cli.rs | Adds the update command surface and compatibility routing for version checks. |
| tests/update_command.rs | Covers update decision states, package-manager routing, standalone replacement, and platform-specific behavior. |
Reviews (7): Last reviewed commit: "fix: compile self-update on Windows" | Re-trigger Greptile
terminal_text rejected parentheses in every operator_name spelling, so complete operator() definitions were degraded to anonymous barriers and lost their structural owner evidence (Greptile P1 on PR #20). The helper only ever reads destructor_name/operator_name nodes; plain identifiers remain protected by identifier_text, so allowing parens is bounded to operator spellings. Adds unit coverage for inline, const, out-of-line, and namespace- qualified operator() plus CLI integration incl. non-Go isolation. Known remaining gap: operator, (comma operator) spelling is still rejected by the comma guard; pre-existing, out of scope. US-072 follow-up. Fix by Luna, review by Waffle, final gate by Milo.
Text OR output now distinguishes three owner-attribution states
without a new flag: named owners render unchanged (byte-for-byte),
analyzed-but-abstained files report parser-known reasons once per
file, and languages without an owner analyzer stay silent.
- Shared seam: attribute_line returns typed OwnerAttribution
(Named | Abstained) with five reasons — parse-failed, error-line,
barrier, top-level, tie — under a fixed precedence; all routed
owner languages flow through the shared decision, adapters only
adapt mechanically to the new return type.
- Supported-language parse rejection is now visible as parse-failed
instead of being indistinguishable from unsupported languages.
- Go parity: same user-visible states; FileAnalysis, attempted-
analysis gating, owner thresholds, and call edges remain
success-only and Go-only.
- Transport: AbstainedTextHit beside OwnedTextHit; named-owner
queries, equality, and edge construction unchanged.
- Rendering: compact adds one aggregate line under the affected
file ('owners: none — abstained (...)' or 'owner abstentions:
...'); detailed mode adds a bounded path-sorted section; named-
only and unsupported files gain zero lines.
- GUIDE: owner rollup corrected from Go-only to multi-language;
documents silence-vs-abstention and that top-level is a lexical
position, not an importance judgment.
Known baseline note: cargo clippy --all-targets carries 25
pre-existing warnings unrelated to this change; the standard
clippy gate is clean.
US-073. Spec + review by Waffle, implementation by Luna, user
acceptance and final gate by Milo.
- Bump Cargo.toml, npm/package.json, Cargo.lock to 1.8.0. - CHANGELOG 1.8.0: C/C++/Ruby owner attribution (8 -> 11 languages), typed abstention transparency, operator() fix, doc scope correction. - README: owner rollup wording corrected to multi-language; call appendix stays Go-only.
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends 1.6.0 owner attribution from 8 to 11 languages for
discover --match any --as texthits.Wave 1 — C/C++ (4ace457)
Lang-parameterized adaptersrc/evidence/owners/c_cpp.rs.ns::Class::method), out-of-line qualified declarators, transparent templates, lambda barriers, type-less ctor/dtor gate bound to lexical classes (never namespaces).TEST(...)) never become owners; qualified identifiers with directERROR/missing children abstain.Wave 2 — Ruby (df01133)
src/evidence/owners/ruby.rs; display distinguishes instanceA::B#mfrom singletonA::B.m.module A; class A::B→A::B); disjoint composition barriers instead of fabricating unprovable owners (RubyModule.nestingresolution is not provable from single-file syntax, unlike C++'s enclosing-namespace constraint); leading::is absolute.class << selfwith state reset on named-container entry; higher-order eigenclass forms barrier.define_method,define_singleton_method, eval/exec families, alias forms,attr_*) are full barriers.Shared invariants
NODE_TYPESfingerprints with explicit per-kind dispositions.Verification
cargo test --lockedgreen (54 suites),clippy -D warnings,fmt --check.TEST()must-abstain), CoreCLR (SAL ERROR-cascade degrade), fmt (macro-dense fail-closed), sinatra + activesupport (metaprogramming hazard sweep: 0 fabricated owners;module ::HelperOneroot-replacement case caught live).Docs (GUIDE/README/CHANGELOG language matrix) intentionally deferred to the release-prep commit per repo convention.
US-073 — Typed abstention transparency (e40e410)
owners: none — abstained (...)/owner abstentions: ...with reasonsparse-failed,error-line,barrier,top-level,tiein canonical order), and unsupported (silent).attribute_lineseam; all 13 routed ownerLangvariants flow through it — adapters changed only mechanically (return type).FileAnalysis, attempted-analysis gating, owner thresholds, and call edges remain success-only and Go-only.top-levelis a lexical position, not an importance judgment.operator() fix (dd7005f)
operator()definitions (inline, const, out-of-line, namespace-qualified) now attribute owners;terminal_textparen allowance is bounded todestructor_name/operator_name. Known pre-existing gap:operator,spelling still abstains.Baseline note:
cargo clippy --all-targetscarries 25 pre-existing warnings unrelated to this PR; the standard clippy gate is clean.US-074 — Installation-aware self-update (e8e0ff2)
srcwalk update [--check]; compatibilityversion --checkroutes through the same strict three-state version decision and points tosrcwalk update.Local verification at e8e0ff2:
cargo test --locked(1474 passed, 1 ignored), standard clippy/fmt/diff gates, npm installer tests, and npm pack dry-run all clean. Commit 64168df only applies three Rust 1.98 clippy-equivalent rewrites required by CI.