Skip to content

fix(reflect): refresh lessons when sidecars change#1470

Closed
oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/reflect-if-stale-sidecars
Closed

fix(reflect): refresh lessons when sidecars change#1470
oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/reflect-if-stale-sidecars

Conversation

@oleksii-tumanov

Copy link
Copy Markdown
Contributor

Follow-up to #1441 and the recent graphify reflect --if-stale work.

graphify reflect uses .graphify_analysis.json and .graphify_labels.json when rendering LESSONS.md, but reflect --if-stale only checked memory docs and graph.json.

That could leave lessons stale after community analysis or labels changed. This updates the freshness check to include those sidecar files too, including custom --analysis / --labels paths.

Tests:

  • uv run --frozen pytest tests/test_reflect.py -q
  • uv run --frozen pytest tests/ -q --tb=short

safishamsi pushed a commit that referenced this pull request Jun 26, 2026
…s check (#1470)

graphify reflect renders LESSONS.md from the memory docs and the
.graphify_analysis.json / .graphify_labels.json sidecars, but reflect --if-stale
only stat'd the memory docs and graph.json. So after community analysis or labels
changed (without the graph changing), --if-stale wrongly reported lessons fresh and
skipped the regen, leaving LESSONS.md stale. The freshness check now also stats the
analysis and labels sidecars, using the same custom --analysis / --labels paths the
run itself uses (so the check and the run can't disagree about which files matter),
and treats a missing sidecar as not-an-input. This makes the documented "no-op when
LESSONS.md is newer than every input" contract actually true.

Ported from PR #1470 by @oleksii-tumanov.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
safishamsi pushed a commit that referenced this pull request Jun 26, 2026
.vue files were dispatched to extract_js, which picks a tree-sitter grammar by
suffix. .vue is neither .ts nor .tsx, so the whole SFC -- <template> markup,
<script>, and <style> -- was fed to the JavaScript grammar, producing a top-level
ERROR node and recovering no imports, symbols, or type references.

A dedicated extract_vue masks everything outside <script> (replacing it with
spaces so symbol line numbers stay accurate) and parses just the script with the
grammar named by `lang` (ts default; tsx/js/jsx honored). .vue also joins the
cross-file symbol-resolution pass now that it parses cleanly.

Ported from PR #1468 by @papinto. Maintainer fix on top: the <script> open-tag
scan now skips over quoted attribute values, so a `>` inside one (Vue 3.3+ generic
components, e.g. generic="T extends Record<string, unknown>") no longer ends the
tag early and swallow the body. Added a regression test for that case.

(CHANGELOG also records #1470, committed just prior.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@safishamsi

Copy link
Copy Markdown
Collaborator

Thanks @oleksii-tumanov — correct and well-targeted. --if-stale was checking the memory docs and graph.json but not the .graphify_analysis.json/.graphify_labels.json sidecars that reflect actually reads, so lessons could go stale after analysis/labels changed. Routing the same resolved --analysis/--labels paths through both the freshness check and the run (so they can't disagree), and treating a missing sidecar as not-an-input, is exactly right — it makes the documented "no-op when newer than every input" claim true.

Landed on v8 in 75a5e6d with your authorship preserved. Full suite green (49 reflect tests). Closing as merged-by-port — thanks!

@safishamsi safishamsi closed this Jun 26, 2026
@oleksii-tumanov

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review and for landing it!

safishamsi added a commit that referenced this pull request Jun 27, 2026
Dates the 0.8.50 CHANGELOG and bumps the version. Highlights: WPF/XAML extraction
+ ViewModel/binding links (#1460/#1473), Objective-C relationship fixes (#1475),
.vue SFC grammar fix (#1468), Metal shader indexing (#1480), Java field/annotation
references (#1485/#1487), portable wiki links (#1444), *_BASE_URL backend overrides
(#1458), non-streaming OpenAI-compatible calls (#1223), reflect --if-stale sidecar
freshness (#1470), label --missing-only (#1481), canvas grid + case-fold dedup
(#1452/#1453), the Read|Glob hook extension fix (#1463), and the no-API-key skill
clarification (#1461).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants