You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
check HEAD --signatures flags newly ADDED exported functions (should only flag modifications) #2674
codegraph check HEAD reports [FAIL] signatures when an exported function is newly added (not modified). The predicate help text says "Assert no exported function/method/class declaration lines were modified" — additions are not modifications, yet they are flagged, and the run exits 1. This blocks additive-extension work.
Minimal repro
In a tracked JS file, append a new exported function (no existing lines touched):
Inserting the function before an existing export and appending at EOF both fail → not a line-offset artifact.
Declaring it as export const brandNewThing = (x) => x; is also classified function and flagged → no syntax workaround.
codegraph check HEAD --json reports the symbol with "passed": false; the symbol is absent at HEAD (e.g. git show HEAD:<file> | grep -c brandNewThing → 0) and has 0 transitive callers (codegraph fn-impact brandNewThing → 0).
Manifesto mode (codegraph check, no ref) exits 0.
Version
@optave/codegraph3.17.0 (native engine unavailable → wasm). Report pointer: dist/features/check.js:439 (checkNoSignatureChanges) flags any changed range covering an exported def line without distinguishing add from modify.
Requested
Discriminate additions from modifications: only flag a symbol whose declaration exists at the base ref and changed at the same line/signature; treat symbols that are new at HEAD as non-violations. (Or add an explicit opt-out flag for additive changes.)
Opened PR #2677 for this: fix(check): don't flag newly-added exported functions as signature changes.
Implements the add-vs-modify discrimination using the already-parsed ParsedDiff.changedEdits — a pure insertion (empty removedText) means the declaration is new at the base ref, not modified.
Opened PR #2677 for this — fix(check): only flag modified exports whose name existed at the base ref.
A declaration is now flagged only when a symbol of the same name appears in the file's removed lines (i.e. existed at the base ref). This covers both false-positive facets:
appends / pure insertions
renames and newly-exported names that share a hunk with removed text (register → registerPanel, etc.)
Genuine same-name signature edits still flag. tests/integration/check.test.ts → 62/62 pass.
Activity
avengedsevenskull-ctrl commentedon Sep 30, 2026
Opened PR #2677 for this:
fix(check): don't flag newly-added exported functions as signature changes.ParsedDiff.changedEdits— a pure insertion (emptyremovedText) means the declaration is new at the base ref, not modified.tests/integration/check.test.ts→ 61/61 pass,tscclean, lint/commitlint pass.Refs, does not close — verification welcome.
fix(check): flag a modified export only when the name existed at base
avengedsevenskull-ctrl commentedon Sep 30, 2026
Opened PR #2677 for this —
fix(check): only flag modified exports whose name existed at the base ref.A declaration is now flagged only when a symbol of the same name appears in the file's removed lines (i.e. existed at the base ref). This covers both false-positive facets:
register→registerPanel, etc.)Genuine same-name signature edits still flag.
tests/integration/check.test.ts→ 62/62 pass.Refs, does not close.