Skip to content

Decide: should a comment-only edit inside a grounded function count as GROUNDING_DRIFT? #236

Description

@theyashasvipandey

Question: should a comment-only edit inside a grounded function count as grounding drift?

Today it does. On Hono, adding one comment line inside errorHandler and then refreshing the
graph produced:

⚠ GROUNDING_DRIFT Grounded node body changed: …

GROUNDING_DRIFT compares the committed bodyHash with the node's current bodyHash. The body
hash covers the raw source text, so comments and formatting count.

For keeping it: a comment can be the thing the knowledge paraphrases, so a change there can
matter. It's also simple and has no false negatives.

Against: comment and formatting churn is common, especially from formatters and doc passes.
Each one produces a warning that can only be cleared by a sync session (see #124), which trains
people to ignore GROUNDING_DRIFT.

Options

  1. Keep today's behaviour.
  2. Hash a normalized body (comments and insignificant whitespace stripped, using the same
    tokenization the fingerprint already does) for bodyHash. That's a format change to a
    committed field, so it needs versioning like any bodyHash change.
  3. Keep the raw hash, but also store a normalized hash. When only the raw one differs, report
    at a lower severity (info), or auto-accept.

Related: #124 (clearing GROUNDING_DRIFT needs an interactive AI session).

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    checkerRelated to drift checkerscore / discuss-firstCore behavior that requires maintainer discussion before implementationquestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions