fix(graph-ui): honest Project-ID label; RED repro for TS inherited-method gap#847
Merged
Conversation
The New Index modal presented the project name as an optional display name, but the value becomes permanent identity: the database filename, the projects primary key, and the QN prefix of every node. It can never be renamed afterwards. Implements the decision from the #805 review: keep the field, make it honest. The label now reads "Project ID (optional — permanent, cannot be renamed)", the placeholder and a new help line explain that the ID becomes the database name and query prefix and that leaving it blank derives it from the path. Both EN and zh locales updated, test asserting the old label adjusted. Co-authored-by: rarepops <rarepops@protonmail.com> Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
PR #840 flips the lrp_ts_s6_inherited_method probe from a fragile false-green (a unique_name short-name registry guess that happened to bind the right node in a 2-file fixture) to asserting the weak edge is suppressed. That flip is correct, but it leaves the underlying gap — ts_lsp cross-file INHERITED method call resolution — with no red reproduction anywhere. Add tests/repro/repro_ts_inherited_method.c to the non-gating repro suite: base.ts defines Base.greet, derived.ts has Derived extends Base and a typed call site d.greet(). A GREEN precondition test proves both files extract cleanly, the Base.greet Method def exists and the call site is extracted; the RED pipeline test additionally verifies the callee node and the INHERITS edge are in the graph, then asserts the correct outcome: a CALLS edge callSite -> *.Base.greet carrying an lsp_ts_* strategy on that same edge. The pre-#840 lucky unique_name fallback edge does not satisfy it (verified: the run dumps that exact edge, strategy unique_name, confidence 0.75), and post-#840 suppression yields no edge at all — so the test stays RED until ts_lsp genuinely resolves cross-file inheritance. Guards the gap left visible after Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com> #840's probe flip; see the test header for the root-cause pointer.
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.
distill: honest Project-ID label + RED repro for the TS inherited-method gap
Two small, independent deliverables distilled from recent review decisions.
1.
fix(graph-ui): label Project name honestly as permanent IDThe New Index modal presented "Project name" as an optional display name, but the
value becomes permanent identity: the database filename, the
projectsprimary key,and the QN prefix of every node. It can never be renamed afterwards.
This implements the decision from the #805 review (credit: @rarepops, whose PR
identified the dishonest label): keep the field, make it honest.
项目 ID(可选,永久且不可重命名)).Leave blank to derive it from the path." (zh:
将作为数据库名称与查询前缀;留空则从路径派生。)留空则从路径派生).graph-ui/src/lib/i18n.ts; the test asserting the oldlabel (
StatsTab.test.tsx) updated.Verification:
npx vitest run→ 13/13 green (under anen_USlocale; onepre-existing, unrelated locale-dependent failure exists on
maininGraphTab.test.ts— baretoLocaleString()formats2,000as2.000on aGerman-locale machine; untouched by this PR).
npx tsc -bclean.2.
test(repro): RED — TS cross-file inherited method call unresolvedPR #840 flips the probe
lrp_ts_s6_inherited_methodfrom a fragile false-green(a
unique_nameshort-name registry guess that happened to bind the right node ina 2-file fixture) to asserting the weak edge is suppressed (
calls == 0).That flip is correct — but it leaves the underlying gap (ts_lsp cross-file
inherited method call resolution) with no red reproduction anywhere.
Per repo discipline (reproduce discovered gaps immediately; RED entries live in the
non-gating repro suite), this adds
tests/repro/repro_ts_inherited_method.c:base.ts(export class Base { greet() ... }) +derived.ts(
Derived extends Base+ a typedconst d: Derived = new Derived(); d.greet()call site).
has_error),Base.greetis extracted as a Method, the
greetcall site is extracted — so the red below isattributable to resolution only.
preconditions (a
Methodnode with QN suffix.Base.greetexists;INHERITS >= 1)and then the CORRECT outcome: a CALLS edge from
callSiteto*.Base.greetcarrying an
lsp_ts_*strategy on that same edge. A strategy-less short-namefallback edge (pre-fix(resolver): suppress weak short-name strategies for TS/JS (recovers #836) #840 lucky green) does not satisfy it; post-fix(resolver): suppress weak short-name strategies for TS/JS (recovers #836) #840 suppression
(no edge) doesn't either. Green ⟺ genuine ts_lsp cross-file inheritance
resolution.
Makefile.cbmTEST_REPRO_SRCSandtests/repro/repro_main.c(suite
repro_ts_inherited_method; deliberately non-gating,make test-repro).RED evidence (verbatim)
From
CBM_INDEX_SUPERVISOR=0 CBM_REPRO_ONLY=repro_ts_inherited_method ./build/c/test-repro-runner:Red-for-the-right-reason proof: the GREEN row is the extraction-precondition test
(both files parse cleanly,
Base.greetMethod def +greetcall site extracted);the store-level preconditions inside the failing test (callee node present,
INHERITS >= 1) printed no failure; and the edge dump shows the graph holds exactlythe weak
"strategy":"unique_name"fallback edge (confidence 0.75) that #840'sanalysis predicted — the lucky wrong-mechanism edge, not an
lsp_ts_*resolution.The FAIL fires on the primary missing-LSP-resolution assertion only.
Root-cause pointer (documented in the test header): ts_lsp cross-file inheritance
resolution —
internal/cbm/lsp/ts_lsp.cmethod lookup does not follow the(correctly extracted) INHERITS edge from
Derivedto an importedBase. See#836/#840 and the S6 probe.
Refs #805-review, refs #835.