Skip to content

fix(bin): completely suppress Node 25 warning to prevent console pollution - #6

Merged
ardelperal merged 1 commit into
mainfrom
fix/node25-silent
Jun 29, 2026
Merged

fix(bin): completely suppress Node 25 warning to prevent console pollution#6
ardelperal merged 1 commit into
mainfrom
fix/node25-silent

Conversation

@ardelperal

Copy link
Copy Markdown
Owner

Removes the stderr warning for Node 25 entirely. Since --liftoff-only is automatically set on Node >= 22, the JIT allocator bug is bypassed and warning output is no longer necessary.

@ardelperal
ardelperal merged commit b777f90 into main Jun 29, 2026
@ardelperal
ardelperal deleted the fix/node25-silent branch June 29, 2026 11:33
ardelperal added a commit that referenced this pull request Jul 4, 2026
…aph edges (closes #49) (#74)

Access forms bind to data declaratively: the form's `RecordSource`
and each ComboBox/ListBox's `RowSource` hold either a table name,
a saved-query name, or inline SQL. The `vba-sql-impact` skill
already parsed these at query time but never contributed to the
graph — impact analysis ("which forms break if `TbExpedientes`
changes?") required out-of-graph file reads.

Indexing a `.form.txt` / `.report.txt` now emits `references`
edges:
- form-layout → table/query for the form-level `RecordSource`,
  tagged `metadata.synthesizedBy: 'vba-record-source'`;
- form-instance-control → table/query for each `RowSource`
  inside a control, tagged `metadata.synthesizedBy: 'vba-row-source'`.

Changes:

* `VbaFormExtractor` (`src/extraction/vba-form-extractor.ts`)
  gains:
  - `SQL_PREFIX_RE` — detects whether a binding value is inline SQL
    (`SELECT` / `PARAMETERS` / `WITH` / `INSERT` / `UPDATE` / `DELETE`)
    vs a bare table-or-query name.
  - `RECORD_SOURCE_RE` / `ROW_SOURCE_RE` / `ROW_SOURCE_TYPE_RE` —
    property-matching regexes tolerant of SaveAsText's doubled-quote
    escapes and case-insensitive Access variants.
  - `SQL_TABLE_RE` — duplicate of `VbaExtractor`'s FROM/JOIN/INTO/
    UPDATE parser (kept self-contained because the original is
    `private`; same Unicode `\p{L}` handling, same `/giu` flags,
    same bracketed/identifier alternation).
  - `synthClassNodeIds` — de-dup cache keyed on
    `(filePath, 'class', tableName, 0)` so the same table
    referenced from N sites collapses to one synthetic placeholder
    node. Mirrors `VbaExtractor.synthClassNodeIds`.
  - `isLikelySql(value)` — classification helper.
  - `emitTableReference(targetName, line, col, synthesizedBy)` —
    emits a `references` edge to a dedup'd `class` placeholder,
    matching the line-stable id convention used by
    `VbaExtractor.emitReference`.
  - `emitBinding(value, line, col, synthesizedBy)` — classifies
    SQL vs bare-name and dispatches to either `SQL_TABLE_RE`
    (one edge per table named in the SQL) or a single `references`
    edge to the bare name (which resolves at index time to a `query`
    node or the synthetic `class` placeholder).
  - `sweepRecordSources()` / `sweepRowSources()` — run after
    `sweepControls()` so `form-instance-control` nodes exist
    before RowSource attribution. RowSources are attributed to the
    nearest enclosing `form-instance-control` via a stack of
    currently-open control blocks; form-level RowSources fall back
    to the form-layout as the source.
  - `findRowSourceType()` — companion helper to `findControlName`
    that captures the `RowSourceType = "..."` line within the
    same scan window. When `RowSourceType = "Value List"`, the
    RowSource for that control is silently skipped (literal value
    lists are not SQL).

* REQ-FORM-4 invariant refined: forms still emit only `file`,
  `form-layout`, `form-instance-control`, and `property` nodes
  for the form's own symbols. The class PLACEHOLDER nodes this
  PR introduces are SYNTHETIC references to external
  tables/queries (the same shape `VbaExtractor.emitReference`
  already produces for DoCmd-style code-side references) and
  carry `metadata.stub: true`-equivalent via their line-0 stable
  id + filePath that doesn't match any real `.cls`. The form's OWN
  `.cls` binding (unresolved reference to the sibling `.cls`)
  stays unresolved — atoms #6 tests this distinction explicitly.

* 8 regression atoms in `__tests__/extraction-vba-form.test.ts`
  (new describe "VbaFormExtractor — RecordSource / RowSource
  bindings emit references edges (Issue #49)"):
  1. Form-level `RecordSource = "TbExpedientes"` → 1 edge
     form-layout → class placeholder, tag
     `'vba-record-source'`.
  2. Form-level inline SQL `SELECT … FROM TbUsuarios ORDER BY …
     ` → 1 edge to `TbUsuarios` (parser strips SELECT/FROM/ORDER
     BY clauses), tag `'vba-record-source'`.
  3. ComboBox `RowSource = "SELECT Id, Nombre FROM
     TbProvincias"` → 1 edge from the form-instance-control node
     (NOT form-layout), tag `'vba-row-source'`.
  4. ComboBox `RowSourceType = "Value List"` followed by
     `RowSource = "uno;dos;tres"` → 0 edges (skipped).
  5. Mix of SQL and Value-List controls — exact edge count = 2;
     only SQL controls get edges.
  6. REQ-FORM-4 invariant — verifies no `function`/`module`/
     `event`/`declare`/`type`/`class` (form's own binding)
     nodes; confirms synthetic `class` placeholder nodes for
     tables ARE emitted (new behavior, bounded separately).
  7. `RowSource` at form-level (outside any control Begin
     block) → falls back to form-layout as source, tag
     `'vba-row-source'`.
  8. Same table referenced from BOTH RecordSource AND RowSource
     → 1 class node, 2 edges (one of each tag).

Validation:

* `pnpm exec vitest run __tests__/extraction-vba-form.test.ts
   -t "Issue #49"` → 8 passed in 666 ms
* Full VBA suite (6 files): **250 passed** in 2.66 s — zero
  regressions, including the existing REQ-FORM-4 atoms
* `pnpm run build` → tsc clean, no TS errors

Out of scope (intentional, per issue spec):

* Sharing `SQL_TABLE_RE` with `VbaExtractor` — kept self-contained
  inside `vba-form-extractor.ts` rather than weakening
  `VbaExtractor`'s `private` visibility. The 2 regex literals are
  identical; a future refactor can extract them to a shared
  `vba-sql-regex.ts` if a third caller appears.
* `codegraph-vba` skill `vba-sql-impact` — unchanged. The graph
  edge emission is now primary; the skill can prefer the graph
  and keep the file parse as fallback.
* `.csv` / `.xlsx` `RowSourceType = "Table/Query"` siblings —
  same dual-match behavior as the SQL path; not in any test
  fixture.

## Not done

n/a — issue complete in this PR.
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.

1 participant