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
- Keep today's behaviour.
- 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.
- 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).
Question: should a comment-only edit inside a grounded function count as grounding drift?
Today it does. On Hono, adding one comment line inside
errorHandlerand then refreshing thegraph produced:
GROUNDING_DRIFTcompares the committedbodyHashwith the node's currentbodyHash. The bodyhash 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
tokenization the fingerprint already does) for
bodyHash. That's a format change to acommitted field, so it needs versioning like any
bodyHashchange.at a lower severity (info), or auto-accept.
Related: #124 (clearing
GROUNDING_DRIFTneeds an interactive AI session).