Commit Graph
2968 Commits
Author SHA1 Message Date
Martin Vogel a35671e962 test(resolver): pin the JS and TS gaps found while auditing, with why
JavaScript instance and inherited members, `super.m()`, a member assigned in a block,
and a class type parameter blocking its name file-wide all abstain today. Each entry
says why and what was tried, so turning one into an edge has to come with a real rule.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 18:25:54 +01:00
Martin Vogel 3c18bd6a31 test(parallel): TS gaps the rules satisfy become required
A TSX script's own component, a nested namespace sibling and a rest-parameter callee
all resolve to their exact oracle targets in both routes, so those known gaps are
required now and the parameter shadow stays a hard negative.

The imported annotation pinned USAGE, which es_usage_crossfile_typescript forbids at
such an occurrence. It requires USES_TYPE at that span, and the second-file decoy and
local same-named class are checked on USES_TYPE too. The namespace constructor call
remains a counted gap.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 18:21:25 +01:00
Martin Vogel 46daeae2eb fix(resolver): new X() targets the constructor X declares
mkc_c8_typescript_constructor_samefile and lrp_ts_s3_constructor name the declared
`constructor` as the target of `new Widget(name)`, and the edge went to the Class,
which the quality harness reports as WRONG_OCCURRENCE. A class that declares a
constructor now answers with it, in the same file and through an import. A class
without one stays the Class node, the materialized callable ts.same-file-constructor
requires.

Oracle changes, each because a rule is true now and a stricter entry replaces a gap:

- lsp_resolution_probe: implicit `new` targets the Class, required, not an
  unmaterialized gap; s3 requires Widget.constructor. Its three TS annotation entries
  pinned USAGE, which es_usage_crossfile_typescript forbids at the same occurrence;
  they require USES_TYPE at that span, and the b/types.ts decoy is checked on USES_TYPE.
- matrix_known_classes, matrix_new_constructs, node_creation_probe: TS calls that are
  now proved are required instead of counted gaps. Their forms and targets are unchanged.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 17:52:31 +01:00
Martin Vogel 3ac5f6eada fix(resolver): a function const is not visible before its own line in its scope
`accept(target); const target = () => {};` in one scope reads the const in its dead
zone, and `var` reads undefined, so no reference there names the function. The
binder treated a function value as visible everywhere, which published the edge
pipeline_cross_file_method_defines_method_venue_parity forbids. A closure still names
it, its own body included.

Tests: the CommonJS contract now counts the promoted case as found, and the JSX oracle
requires the USAGE that `<UI.Widget />` genuinely has: it reads that namespace member,
while the invocation stays a counted gap.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 17:42:17 +01:00
Martin Vogel 7790bc038c fix(resolver): mapped and infer type names shadow a same-named type
`{ [K in Keys]: K }` and `T extends Array<infer U> ? U : never` bind K and U where
they are written. With USES_TYPE now walking every type name, both reached a
same-named module type, which is a wrong edge. They block that name the way a type
parameter does.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 17:33:32 +01:00
Martin Vogel 468f0a1058 fix(resolver): an admitted alias call leaves no unresolved row
`import { foo as bar }` then `bar()` kept an unresolved_calls row even with the exact
edge admitted. The per-file LSP reported the exported name, and the diagnostic joins
its call site by spelling, so it never found the occurrence that later cleared it.
It reports the spelling the file wrote now.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 17:17:34 +01:00
Martin Vogel 18d8a9aa6c fix(resolver): a TypeScript type name is USES_TYPE, never USAGE
es_usage_crossfile_typescript caught a wrong edge: with type positions resolving, a
parameter annotation also published USAGE to the interface. Its oracle forbids that,
because USAGE means a value. Every annotated name in TypeScript did this, so USAGE on
real code counted types as values.

A written type name, and the `Ns` root of `Ns.Type`, now abstains from USAGE with
reason usage_names_a_type. `typeof value` stays USAGE: it reads a value.

USES_TYPE had to take those names over, and it only looked at signatures and a few
body forms. It now walks every type name in the TS family, so class fields, heritage
clauses and alias bodies are not lost.

Also promotes two known gaps these rules satisfy: the TS parameter annotation and the
CommonJS `module.exports = async function`.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 17:11:05 +01:00
Martin Vogel 1afb6e08f4 test(resolver): TS known gaps the new rules satisfy become required
Twelve RQ_KNOWN_GAP cases (inline constructor receivers, implicit constructors,
parameter-property and field receivers, a TS script's own declaration) now resolve
to the exact oracle target, and rq_check reports them as PROMOTE_TO_REQUIRED. Their
oracles are unchanged; only the excuse goes.

tslsp_param_property_this_dispatch_issue514 and tslsp_field_new_initializer_issue514
pinned the inference label lsp_ts_method. Those receivers are proved now, so they
assert the stricter ts514_proved_count at the same exact target; the decoy counts
(wrong override, unknown, factory, plain parameter) are untouched.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 17:03:47 +01:00
Martin Vogel e0d2a414fa fix(resolver): CommonJS names follow the object module.exports finally is
Three CommonJS facts the export table had wrong:

- `exports = x` without module.exports detaches the name, so a later `exports.y`
  is not an export. It was published as one.
- `exports.y` or `module.exports.y` written before the last `module.exports =`
  went to the replaced object.
- `exports = module.exports = createApp; exports.named = named` makes `named` a
  name of the required value. `require(x).named` looked only for a member declared
  under createApp, and `module.exports = require('./app')` did not forward names.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 16:27:40 +01:00
Martin Vogel 73a906ca16 fix(resolver): JavaScript member rule withholds what an assignment does not settle
An adversarial read of the member rule found eight wrong edges on one fixture:

- A function inside a nested scope named its `this` owner by spelling, so a
  parameter or local `Owner` reached the module-level `Owner`'s members.
- `get m()` was taken for the callable; a call invokes what the getter returned.
- Object.assign, Object.defineProperty, mixin and `delete` replace members without
  spelling an assignment.
- A class field initializer inside a member inherited the literal's `this`.

Owners now need a module-level function, mutator calls and `delete` make every
member of that owner unknown, and a class body clears `this`.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 16:19:53 +01:00
Martin Vogel a32c207f11 wip(resolver): clang-format binding.c and fix the deprecated sprintf in the TS proof test
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 16:09:33 +01:00
Martin Vogel 20dd0d8715 wip(resolver): JavaScript member rule and format pass, untested
Preserves the js-ts lane's on-disk work after its tools were refused. Nothing here has been through a suite: no RED proof, no precision sample for the member rule. Not ready to integrate.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 14:27:22 +01:00
Martin Vogel 7a13f401eb wip(resolver): JavaScript and TypeScript modules, scopes and exports
Checkpoint against a usage limit. Proved on express and kilocode subtrees; the
test suites have not run on this tree yet, so later commits may adjust it.

- Real lexical scopes replace the module-wide veto on any local name.
- CommonJS syntax, module extensions, package.json type and TypeScript prove a
  module; a classic browser script stays unproved.
- require bindings and an exported-name table: aliases, default exports, barrels,
  export *, export * as, module.exports and exports.x.
- Directory imports resolve through main and index.
- TS method proofs survive destructuring, catch, generics and decorators, take
  own and inherited methods, this.field and new X() receivers, and have no budget.
- TS annotations give exact type-name occurrences.
- A registered route suppresses the unresolved diagnostic again.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 14:07:04 +01:00
Martin Vogel 2973a3277a test(resolver): project-wide proof pools must have no work budget
Each pool below holds a whole project's proofs and refused publication once its
fixed budget ran out:

  shared resolver  64M  django needs 133M, kubernetes 2.28G
  graph buffer     4G   kubernetes needs 5.03G
  infra adapters   4M   kubernetes' 6456 YAML files exhaust it

The shared test reaches its budget with one small Go file and a long project name,
because every proof hashes that name; the same file under a short name is the
control. The graph and adapter tests spend the former budget up front instead of
building a project that size. The graph pool is private, so that needs a test seam.

RED: cbm_shared_resolver_build returns NULL for the long name only,
cbm_gbuf_record_resolution fails, and the adapter pool refuses a leaf.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 00:20:14 +01:00
Martin Vogel e79f61db49 fix(resolver): keep JSON strict when source text is not UTF-8
yyjson's strict writer refuses a whole document over one undecodable byte. Source
files can be in any encoding, and the strict resolver puts source text in JSON on
its way to publication, treating a NULL write as fatal:

  record_properties    call arguments and callee    -> aborted_previous_preserved
  fact_json            proof lookup keys and scopes -> persist_failed
  pass_pkgmap          import paths and names       -> aborted_previous_preserved
  lsp_surface          definitions and imports      -> every file's surface row dropped

Neovim and redis took the first route: a latin-1 string argument in a test file
stopped the whole index. Main writes these same bytes into edge properties raw, so it
published, with invalid UTF-8 inside that JSON.

Add cbm_json_write_text: valid documents are written unchanged at no extra cost,
and only a document the writer refused has its strings repaired, replacing undecodable
bytes with U+FFFD. That covers every field of a document, rather than each field that
happens to carry source text today. The exact-bytes columns (resolver_occurrences
spelling, resolver_lookups key) keep the original bytes; the MCP layer normalizes
those at its own encoding boundary.

The pending unresolved-call key is compared against text read back from that JSON,
so it applies the same replacement to both sides.

The UTF-8 sequence check moves from mcp.c to foundation/str_util so there is one copy.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 23:57:23 +01:00
Martin Vogel 0ec996e8d7 test(resolver): source text that is not UTF-8 must not stop publication
Each route is one way such bytes reach a strict JSON writer before publication:
a call argument (redis deps/tre/tests/retest.c, neovim's legacy specs), a callee
spelling, and an import path. The parallel leg also checks the argument text
survives on the published edge as U+FFFD.

RED: cbm_pipeline_run returns CBM_PIPELINE_ABORT_PRESERVE_DB or
CBM_PIPELINE_PERSIST_FAILED, depending on the route.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 23:51:54 +01:00
Martin Vogel d0da16b9a2 test(c_lsp): a nested syntax error bounds proofs at the error
Shape of redis src/defrag.c🔢 an #ifdef splitting a long else-if chain
puts the first syntax error more than 16 levels under the root. Today that
fails the whole file before its include table exists, and the next declared
binding dereferences it, so the indexing worker dies with SIGSEGV.

RED: SIGSEGV in c_proof_direct_class.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 23:36:17 +01:00
Martin Vogel 6f9374281f Merge main a6d0d6c9 into the strict shared resolver
Threads main's Go rel_path (#1910) through the proof-source and import-snapshot variants, keeps main's ADR sidecar so the rebuild no longer re-applies ADRs, and keeps the feature's removal of the import name fallback and JVM tail join, inside which main had added a generated-member filter. Main took semantic index version 12 for Markdown Section names, so the resolver generation becomes version 13.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 22:12:49 +01:00
Martin Vogel de578b0d47 test: restore main's strategy helper and fix the yyjson include after the merge
The reviewed reconciliation of tests/test_pipeline.c kept main's call sites of cross_file_call_has_strategy but dropped its definition, and test_resolver_integration.c used a bare yyjson.h that no include path provides. Neither candidate had been compiled.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 21:57:40 +01:00
Martin Vogel e9426010c1 test(graph_buffer): a failed edge append must not report success
Adds a class-filtered, thread-local, one-shot realloc failure hook compiled only with CBM_MEM_TEST_API, and a regression that fails the primary edge array's first growth. The old code registered the secondary and dedup entries and returned a positive id while the array the dump reads stayed empty, so a retry appeared to succeed and the edge was lost and leaked.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 21:34:41 +01:00
Martin Vogel ea54e63d55 Merge pinned main 7b398de4 into the strict shared resolver
Resolves the nine textual conflicts with the reviewed reconciliation: semantic index version 12 on top of main's migrations, digest stream v3 because both sides independently claimed v2, incremental metadata-current requires main completeness and the strict resolver generation receipt, and exact call joins by extraction index, full span and origin. Unresolved-call diagnostics reconcile only after final proof sealing and successful projection.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 21:34:07 +01:00
Martin Vogel a6d0d6c9bb Merge pull request #1936 from ilyabrykau-orca/fix/go-field-type-hint-owner-segment
fix(pipeline): bind field_type_hint by owning QN segment, not substring
2026-10-31 21:28:06 +01:00
Martin Vogel f6fb3e0d36 Merge pull request #2371 from BobbieBarker/fix/elixir-extraction-defects
fix(elixir): guarded def heads, multi-clause spans, and typespecs walked as code
2026-10-31 20:08:31 +01:00
Martin Vogel 7be2becf73 Merge pull request #2315 from 0xb007ab1e/fix/adr-reindex-race
fix(pipeline): preserve concurrent manage_adr write across reindex swap
2026-10-31 19:55:37 +01:00
Martin Vogel 257821805c Merge origin/main into fix/go-field-type-hint-owner-segment
Resolved tests/test_pipeline.c as the main version plus this PR diff: the owner-segment field-hint tests follow the new bare init tests, and both RUN_TEST pairs stay registered (pass_parallel.c merged cleanly).

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 19:35:24 +01:00
Martin Vogel a33cddcdba Merge origin/main into fix/go-field-type-hint-owner-segment
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 16:39:01 +01:00
Martin Vogel a5c5b42fea Merge origin/main into fix/elixir-extraction-defects
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 16:38:55 +01:00
Martin Vogel 8cef96dd88 Merge origin/main into fix/adr-reindex-race
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 16:38:41 +01:00
Martin Vogel 70a7062e18 Merge origin/main into fix/go-bare-init-never-binds
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 16:29:40 +01:00
Martin Vogel 4a78fe6a6b fix(go): a bare init never binds to a package init or an init method
Go gives `init` no binding in the package block: init functions cannot
be referred to from anywhere in a program, and a method or field named
init needs a selector. A bare `init` is therefore always a local name -
a closure (`init := func(ctx) {...}; init(ctx)`), a parameter, or the
`package init` clause of a directory named init.

Before #1915 same_module bound such a name to the flat package init.
With per-file init QNs it now falls through to the short-name fallback
and binds unrelated methods named init. On kubernetes that minted 24
CALLS (22 e2e storage DefineTests closures among them), 28 WRITES,
7 USAGE and one derived TESTS edge, all false.

cbm_go_suppress_bare_init_bind refuses, for a bare Go `init`, any
registry binding onto a Function (every Go Function named init is a
package init) and a weak short-name binding onto a Method or Field.
lsp_* answers and selector calls (`w.init()`) are untouched. Wired at
the CALLS, USAGE and READS/WRITES seams of both resolvers.

Kubernetes, full index, main vs branch: only those 60 edges removed,
nodes identical, no resolver edge added; the 14 LSP-typed selector
CALLS into init methods are unchanged.

Tests: pipeline_go_bare_init_binds_nothing (+ parallel twin) are RED
with the predicate disabled (closure CALLS, parameter CALLS, closure
WRITES, package-clause USAGE onto Watcher.init) and GREEN with it; the
selector control keeps Watcher.Start/Boot -> Watcher.init.
go_bare_init_never_binds_init_namesake pins the predicate.

Refs #1915

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 14:16:05 +01:00
Martin Vogel afb499b62a test(pipeline): pin owner-segment field-type hints for C#
Go no longer runs the parallel field-type hint (e554a2ab), so the Go test
of this PR passes with or without the owner-segment fix. C# still reaches
try_field_type_hint, and its PascalCase method names make every candidate
QN contain a one-letter receiver's hint: `w.Write()` on a StreamWriter was
upgraded to an arbitrary project Write as field_type_hint. The test is RED
on main's pass_parallel.c and GREEN with the fix, and its positive control
pins `store.Put()` to Store.Put, never FileStore.Put.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 13:56:42 +01:00
Martin Vogel 747665d71f Merge pull request #2752 from gaurav0107/fix/2537-go-net-http-servemux-patterns-with-a-met
fix(routes): read Go 1.22 ServeMux method and host patterns
2026-10-31 13:53:35 +01:00
Martin Vogel e0823879e9 Merge pull request #2819 from DeusData/fix/2386-bm25-post-window-filters
fix(mcp): rank every BM25 candidate when post-window filters would hide them
2026-10-31 13:45:14 +01:00
Martin Vogel d1d8bbfa8f Merge pull request #1833 from LeoLan-Digital/fix/permanent-daemon-watch
fix: persist daemon watches across client disconnects
2026-10-31 13:45:05 +01:00
Martin Vogel 70f6de8a2f Merge pull request #2822 from divakantpandey/fix/2722-install-managed-binary-path
fix(cli): use managed binary path for agent configs when externally managed (#2722)
2026-10-31 13:44:54 +01:00
Martin Vogel a2787346c0 Merge origin/main into fix/go-field-type-hint-owner-segment
Resolve tests/test_pipeline.c as main's file plus this PR's own test hunk; the RUN_TEST line is re-anchored before pipeline_go_multi_init_nodes_survive.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 10:08:36 +01:00
Martin Vogel d86ca262ce Merge branch 'main' into fix/2386-bm25-post-window-filters 2026-10-31 06:11:43 +01:00
Martin Vogel c0e929378a Merge origin/main into fix/elixir-extraction-defects
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 06:11:38 +01:00
Martin Vogel 4787012023 Merge origin/main into fix/2722-install-managed-binary-path
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 06:11:22 +01:00
Martin Vogel 3e075d59be Merge origin/main into fix/2537-go-net-http-servemux-patterns-with-a-met
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 06:11:15 +01:00
Martin Vogel 0b0e294be0 Merge origin/main into fix/adr-reindex-race
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 06:11:08 +01:00
Martin Vogel 2609e56336 Merge origin/main into fix/permanent-daemon-watch
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 06:10:47 +01:00
Martin Vogel 8c62cb3344 Merge origin/main into fix/go-init-qn
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 06:10:26 +01:00
Martin Vogel 9f0fdcb400 Merge pull request #2613 from bline/fix/doc-section-hierarchy
fix(markdown): qualify a repeated heading's Section by its parent headings (#2586)
2026-10-31 06:09:28 +01:00
Martin Vogel 85a38ed2a8 Merge pull request #2839 from halindrome/fix/subagent-reminder-cli-fallback
fix(hooks): tell subagents without MCP tools how to reach the graph via the CLI
2026-10-31 06:07:37 +01:00
Martin Vogel 0e4c96b4cf Merge pull request #2849 from DeusData/ci/macos-15-runners
ci: move macOS runners to macos-15 and pin the deployment target to 14.0
2026-10-31 06:07:30 +01:00
Martin Vogel 76dda7e35b Merge pull request #2827 from nefayran/fix/2818-puml-edge-operand
fix(diagram): set an empty PlantUML operand id when there is none
2026-10-31 04:27:30 +01:00
Martin Vogel 395763cd1d Merge origin/main into fix/subagent-cli-hint
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-31 01:02:43 +01:00
Martin Vogel 9bb891b669 ci: move macOS runners to macos-15 and pin the deployment target to 14.0
GitHub retires the macos-14 runner image on 2026-11-02, and its brownouts
already cancel our macos-14 jobs. Move every macos-14 runner reference to
macos-15 (arm64): the release darwin-arm64 build, the unix-macos14 and
tsan-mac test legs, the smoke-mac PR leg (its two matrix.os guards move in
lockstep), the release smoke, both soak legs, the memwaste event lane, the
bug-repro board, the cache warmer and the all-platform smoke. Lane names
stay unchanged: select-lanes.sh, ci-ok and the lane contracts key on them,
never on the runner label.

Two broad legs already ran on macos-15 (_test.yml BROAD_UNIX, _smoke.yml
BROAD_UNIX) and smoke.yml listed both images, so the moved legs would have
duplicated them. Those duplicates are dropped; PR CI keeps exactly the
same legs.

Without an explicit minimum, clang stamps the binary with the SDK's
default (LC_BUILD_VERSION minos), so a release built on macos-15 would
refuse to start on macOS 14. Makefile.cbm now folds
-mmacosx-version-min=14.0 into CC/CXX next to ARCHFLAGS for Apple targets
(detected from the compiler's target, not the host), so it reaches every
compile and link, vendored objects included, on every build path.

Proof on macOS 26.6 / SDK 26.5: the production binary built from
origin/main reports minos 26.0; with this change it reports minos 14.0,
with zero warnings under -Werror, no weak imports and an identical
undefined-symbol set. The test runner (direct make, no env.sh) is minos
14.0 too; platform and daemon_ipc suites pass.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-30 23:44:25 +01:00
Martin Vogel d514868ee4 test(diagram): keep the unclosed class declaration in its own diagram
A class line makes a PlantUML diagram a class diagram, where -> is an arrow rather than a sequence message, so the edge-message fixture could never produce the message arrow it asserts. Put the unclosed declaration in a second @startuml block and assert both diagram kinds.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-30 23:20:25 +01:00