Commit Graph
165 Commits
Author SHA1 Message Date
Martin Vogel f9dc6503ae ci(test-impact): narrow every test leg, on fork PRs, with base tooling
Three changes to how PR CI consumes the test-impact selection (user
decisions R150 and R151, 2026-11-11).

Fork PRs. select-tests ran only when vars.TEST_IMPACT_MODE was `gate`, and
GitHub passes no repository variables to a pull_request run from a fork:
all 24 fork runs in the last 40 PR runs skipped the job, maintainer-started
ones included. The condition is now (vars.TEST_IMPACT_MODE || 'gate') ==
'gate'. Setting the variable to anything else (e.g. `shadow`) still turns
the gate off for same-repository and Dependabot PRs; for fork PRs the off
switch is the default in the expression on main. No pull_request_target,
no new permissions, no secrets.

Base tooling. select-tests built and ran the PR checkout's own engine,
test-impact-select.sh and selection.py, so a change to them could narrow
its own tests. The job now checks out the merge base (HEAD^1 of the merge
ref) into a worktree, builds that engine and runs that copy of the script
with --repo pointing at the PR checkout. test-impact-select.sh separates
the tooling (its own checkout) from the repository under test (--repo).
Until this lands, a PR's merge base has no --repo: the job then fails and,
as before, every test runs.

All legs. Only the Linux x86_64 test leg consumed a selection. A narrowed
answer now also produces portable/ (selection.py --whole-suites with the
platform-specific suites of the base and HEAD), and the arm64 and macOS
test-unix legs and the Windows leg run that view: platform-neutral suites
as selected, every platform-specific suite whole. No portable view, no
narrowing there. Sanitizer, TSan, MSan, diag and LSan lanes still run
every test. The shard harness already slices the selected list, so the
sharded arm64 leg and the shard-completeness proof need no change.

docs/SMART_CI.md and README.md follow; tests/test_lane_wiring_contract.sh
pins the new wiring.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-11 19:50:31 +01:00
Martin Vogel e7c205a996 Merge origin/main into agentty-install
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-09 19:18:33 +01:00
Martin Vogel 28f678819e Merge origin/main into fix/daemon-preserve-ui-setting-20260914
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-05 00:24:51 +01:00
Martin Vogel 710452a00a Merge origin/main into fix/daemon-preserve-ui-setting-20260914
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-04 00:05:44 +01:00
Martin Vogel 980c8ed932 Merge origin/main into persistent-install-hook-opt-out
Bring the branch up to main e0c7a1da6c
(#2395), which includes #1724 (index resource worker and publication
fence, 008b6c3585).

Conflict resolved (1 file):
- docs/CONFIGURATION.md: both sides appended rows to the "Current keys"
  table at the same spot. Resolved as main rows index_max_rss_mb and
  index_max_duration_seconds first, then the branch row install_hooks
  and its paragraph that closes the table. No conflict side was
  concatenated as-is; the branch paragraph must follow the last table
  row.

Auto-merged without conflict: README.md, src/cli/cli.c (CONFIG_KEYS
now holds the new index_max_rss_mb / index_max_duration_seconds keys
and install_hooks), src/main.c (worker publish-fence argv next to the
--hooks/--no-hooks help line).

Check: for all seven branch files, the zero-context patch-id of the
merged tree against main equals the branch own change. Semantic check:
the branch re-signs no function; main re-signed the daemon worker start
callback and the supervisor result struct, which the branch does not
use. No call site adapted.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-03 22:40:15 +01:00
Martin Vogel 3b75f6415b Merge origin/main into agentty-install
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-03 22:29:12 +01:00
Martin Vogel 6ab3653b85 Merge origin/main into feat/index-resource-worker
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-03 18:09:48 +01:00
Martin Vogel 7e67581448 Merge origin/main into persistent-install-hook-opt-out
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-03 03:04:38 +01:00
Martin Vogel c7e7b23ac4 Merge origin/main into fix/daemon-preserve-ui-setting-20260914
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-03 03:04:29 +01:00
Martin Vogel 334a408b63 Merge pull request #2198 from astandrik/fix/1696-bench-runtime-isolation
fix(test): isolate benchmark harness daemon runtimes
2026-11-03 01:51:49 +01:00
Martin Vogel 140e2998a1 Merge origin/main into feat/index-resource-worker
Brings the branch up to main 9c19b5dd.

Two same-spot insertion conflicts, each resolved as the main version
of the file plus the own diff of this branch:
- src/daemon/application.c: the job struct gained watch_owners on main
  and request_started_ms plus the request facts here; both kept.
- tests/test_daemon_application.c: main added the #1818
  autoindex-skipped helpers where this branch added the worker resource
  failure test; both kept, the test placed after the doc_candidates
  test.

Everything else merged cleanly. src/main.c changed on both sides: main
(#2838) lowers the worker CPU priority inside the worker role block,
and this branch strips the publication fence flag before that block
and installs the fence after the worker role options; the hunks are
disjoint and both are kept. tests/test_pipeline.c gained the Next.js
route tests (#2747) on main and the publication gate test here, also
disjoint. No call site needed adapting: no new main code calls a
function this branch re-signed, and main re-signed none that this
branch calls.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 18:15:55 +01:00
Martin Vogel 435a88be62 fix(index): coordinate publication between the worker and its supervisor
A worker resource limit is enforced by the supervisor, but only the worker
replaces the serving database, and it does so before the persistence
artifact export. A limit observed in that window stopped a worker that had
already published, and the response still said serving_index_preserved=true
while the previous index had been replaced.

Publication and resource termination now coordinate through a per-attempt
publication fence: a never-created path next to a reserved unique file in
the private worker directory, which both sides claim by creating it
exclusively (cbm_fopen "wbx": O_EXCL on POSIX, CREATE_NEW on Windows), so
exactly one of them can win.

- The worker claims it through a new pipeline publication gate that
  cbm_pipeline_run calls once, after the last pre-publication check and
  before the serving database is touched. Losing means the supervisor
  already stopped the attempt for a limit: the run aborts before
  publication and the previous generation stays in place.
- The supervisor claims it before it terminates the worker for a limit or
  a failed RSS probe. Losing means the worker already committed to
  publishing: the limit is no longer enforced for that attempt, which runs
  to completion, and index.supervisor.resource_limit_after_publication is
  logged instead. A claim that can be neither won nor lost is retried on
  the next poll rather than risk stopping a committed worker.
- At terminal the supervisor settles the fence into
  result.publication_committed. An unquiesced tree keeps the fence, so a
  surviving member can never publish after the report.

serving_index_preserved now describes the request, not only its last
attempt: a servable index existed when the request began, no attempt of
the request committed to publishing (an earlier attempt can publish and
then crash into recovery), and that index is still servable. The direct
path and the daemon job both fold every attempt into these request facts;
cbm_mcp_index_worker_resource_response takes them as a third argument, and
NULL claims nothing.

The fence path travels as an optional last pair of the exact worker grammar
(--index-worker-publish-fence), accepted by the worker argv parser and by
the daemon bootstrap role check, stripped by the CLI and installed by both
worker entries.

Limits stay opt-in: without index_max_rss_mb or index_max_duration_seconds
there is no fence, no extra argv, no claim and no extra database read.
Graph content is unchanged either way.

RED (c78c077a plus only the new end-to-end test): a FIFO at the artifact
temp path holds the real worker after the rename, and the duration clock
crosses its limit only once the serving database has been replaced. The
supervisor stops the worker there and answers resource_limit_exceeded with
serving_index_preserved=true over a replaced database. GREEN: the worker
claimed first, the supervisor logs the limit as not enforced, and the
released worker finishes and reports the published index.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 18:12:22 +01:00
Martin Vogel 1976986f4b Merge origin/main into fm/cbm-worktree-ignore-1
Brings the branch up to main a5b248f47. Eight files conflicted, each a
same-spot insertion where main and this branch added lines next to the
same anchor. Each resolves to the main version plus the change of this
branch:

- src/cli/cli.h, src/cli/cli.c: CBM_CONFIG_IGNORE_WORKTREES and its
  CONFIG_KEYS row next to the new doc_candidates key.
- src/mcp/mcp.c: the index_worktree schema property next to the new
  doc_candidates property.
- README.md, docs/CONFIGURATION.md: the ignore_worktrees line and table
  row next to the rewritten auto_watch entries and the new
  doc_candidates and watch_non_git rows.
- src/git/git_context.c: the env-isolation comment after the new debug
  stage marker, directly above cbm_popen_git.
- src/cli/hook_augment.c: the new SubagentStart cli_hint ahead of the
  parent-graph check of this branch.
- tests/test_mcp.c: both RUN_TEST blocks; main already includes
  str_util.h.

Per file, the lines changed against main equal the changes of this
branch against the merge-base.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 02:07:22 +01:00
Martin Vogel 04ed0240e9 docs(config): state how ignore_worktrees treats subdirectories
The review of 2026-10-01 asked for this to be a stated decision rather
than a side effect. Detection walks up from the given path to the
nearest .git entry, so a subdirectory of a linked worktree is treated
as that worktree: index_repository on it is refused, and a session root
or hook working directory inside it is handled the same way. The walk
stops at the first .git; outside any checkout it runs to the filesystem
root one directory at a time. None of it runs while the key is off.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 02:04:21 +01:00
Martin Vogel 1adabd8c57 Merge origin/main into carry/1862-install-hook-optout
Maintainer refresh of #1862 (persistent install-hook opt-out, direction
decided in #753) onto main a5b248f4. The first refresh is 2577a86a and
carries the semantic fixes for shell-free Claude hooks.

Textual conflicts, all resolved by keeping both sides:

- src/cli/cli.h: main added CBM_CONFIG_DOC_CANDIDATES on the line where
  the PR added CBM_CONFIG_INSTALL_HOOKS. Both defines are kept, in
  alphabetical order.

- src/cli/cli.c CONFIG_KEYS[]: main added the watch_non_git row where the
  PR added install_hooks. Main row stays first, followed by the
  install_hooks row.

- src/cli/cli.c Codex hook install: main (#2719) declared pretool_written
  in front of the hooks.json branch the PR prefixed with its --no-hooks
  removal branch. The declaration stays first, then the PR removal
  branch, then main hooks.json and config.toml upsert branches unchanged.

Check: for every file the PR touches, the added and removed lines of the
merged tree against main equal those of the PR against its old base.

No compile-level semantic conflict: no function the PR calls changed its
signature, and the PR re-signs no function main calls. The new Codex
PreToolUse hook from #2719 is gated by the opt-out in the next commit.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 01:37:59 +01:00
Martin Vogel da7df66403 Merge origin/main into fix/daemon-preserve-ui-setting-20260914
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 00:56:49 +01:00
Martin Vogel c78c077a50 fix(subprocess): fail the tree probe on a live member it cannot measure
cbm_subprocess_tree_rss_bytes skipped any non-root process it could not
measure and still returned OK with a smaller total, so a descendant the
platform refused to measure silently dropped out of the RSS watchdog.

Now a member is skipped only when the platform says it no longer exists:
ESRCH from proc_pid_rusage on macOS, ENOENT or ESRCH for /proc/<pid>/stat on
Linux, ERROR_INVALID_PARAMETER from OpenProcess (or an exit code from a
handle whose memory query failed) on Windows. Any other failure fails the
probe, which the supervisor already turns into resource_probe_failed after
three consecutive errors. The root stays strict as before.

On macOS the members now come from proc_listpids(PROC_PGRP_ONLY): the old
all-process scan read every process with proc_pidinfo, which answers EPERM
for every process of another user (178 of 6438 on this machine), so it could
not tell a foreign process from an unreadable member and fail-closed
semantics would have failed every probe there. Linux keeps its /proc scan;
stat files are world-readable on a default mount, and a hidepid=1 mount now
fails closed, which the doc states.

A test seam makes every non-root measurement fail with one platform error.
RED (old skip-any-failure decision): the live-member test returns OK where
ERROR is required. GREEN with the fix; the exited-member test passes in both,
so verified exit races are still ignored.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 00:27:33 +01:00
Martin Vogel 760d73c91b Merge origin/main into fix/1696-bench-runtime-isolation
Brings #2198 (benchmark harness runtime isolation, #1696) up to date
with main a5b248f4.

No conflicts. Of the files this branch touches, main changed only
scripts/test.sh since the merge base 8530c8cd: it adds Step 5-alloc
(production allocator contract), far from this branch's Step 0i3,
which is unchanged. scripts/test-runtime.sh, which the harnesses and
their contract test source, is unchanged on main. No caller of either
harness outside docs/EVALUATION_PLAN.md exists on main.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 00:08:59 +01:00
Martin Vogel 32f60a4e8d docs(eval-plan): stop clearing the live cache before an isolated run
Section 7 still began with rm -f ~/.cache/codebase-memory-mcp/*.db.
Every index in the loop now lands in a run-private cache (#1696), so
that line no longer made any run colder; it only deleted the indexes in
the live store of the operator. Dropped, and the comment above it now
names only what the setup still does.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 00:06:52 +01:00
Martin Vogel 78bf6a2745 fix(test): hand over a kept benchmark runtime only after its daemon stopped
With CBM_BENCH_KEEP_RUNTIME=1, bench_finish ran `daemon stop` with its
output and exit status discarded and wrote runtime-root.txt regardless.
`daemon stop` refuses while a committed client still uses the daemon and
fails when the daemon does not answer; the handoff then promised a
stopped daemon that was still running.

A refused stop now prints the explanation of the product, writes no
handoff, keeps the root without cleaning it up (the daemon may still be
using it) and exits non-zero. A stop with nothing to stop still exits 0,
so a clean run is unaffected.

Section 7 step 8 of the evaluation plan follows the same rule: the kept
root is removed only if its daemon stopped, and is kept with a message
otherwise.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-02 00:06:52 +01:00
Martin Vogel 9c836894f6 Merge origin/main into fix/permanent-daemon-watch
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 07:54:04 +01:00
Martin Vogel a3831c9795 Merge pull request #2017 from kobaz/feat/path-allow-broad-too-shallow-override
feat(workspace): add PATH_ALLOW_BROAD override for too-shallow roots
2026-10-29 07:53:11 +01:00
Martin Vogel ed17097e34 Merge origin/main into fix/permanent-daemon-watch
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-29 04:07:49 +01:00
Martin Vogel 5d97172b89 Merge origin/main into docs/windows-troubleshooting
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 18:12:53 +01:00
Martin Vogel 70d6d5017c docs(watcher): describe the watch lifetime under daemon start
A daemon started with `daemon start` now keeps a project watched after its
last owning MCP session closes, until the daemon stops, the project is
deleted, its directory disappears, or auto_watch is set to false. README
(the watcher paragraph and the index_repository row), the watcher_enabled
row of docs/CONFIGURATION.md and the comment above the index_status watch
provider still said every watch ends with its last session.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 00:51:48 +01:00
Martin Vogel 0373c4a577 Merge origin/main into the agentty client branch
Bring the branch up to date with main (83109dde) so CI checks the
agentty integration against the current tree. No conflicts.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-28 00:00:10 +01:00
Martin Vogel 34ea462738 docs: restore agentty client counts lost in the main merge
The 2026-10-23 merge of main took main's reworded text in README.md,
pkg/npm/README.md, docs/llms.txt and docs/index.html, and with it the old
45 surfaces / 39 detected counts. This branch registers agentty as the
46th client surface (40 detected automatically, 6 conditional/explicit),
so the docs disagreed with the installer and with the CLI help in
src/main.c.

Re-apply the counts on top of main's wording: 46 surfaces and 40
detected, with agentty in the detected lists of the npm README, the
landing page and llms.txt.

cli_supported_agent_surfaces_match_installers (tests/test_cli.c) checks
these strings and failed on every test leg at tests/test_cli.c:7326.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-27 23:59:57 +01:00
Martin VogelandTamer a36b2ee6da docs(troubleshooting): refresh Windows entries for v0.12.x
- Non-ASCII paths: drop the NTFS junction example; the workaround is
  ASCII-only paths for the two variables, or an upgrade.
- Update entry: name the real command (update, not upgrade) and mark
  #1168 as closed, fixed in v0.10.0.
- Index worker: from v0.12.0 a worker that exits without returning a
  result is no longer counted as a success, and its log is kept; ask
  for logs when indexing still fails on v0.11.0 or newer.
- Antigravity: state the affected range (all releases through v0.12.1
  when neither detection signal is present) and which signal each
  version checks; scope the duplicate binary to v0.9.x and earlier.
- OpenCode: list the detection signals per version (PATH, config, and
  from v0.12.0 the data folder), the 4 KB PATH and npm/mise/scoop shim
  gaps fixed after v0.12.1 (#2381), and a workaround per version.

The page structure and the original entries were first drafted by Tamer
in #2262.

Refs #1170

Co-authored-by: Tamer <tamer.elbakkali@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-27 23:49:24 +01:00
Anton Standrik 54c18648c2 docs(eval-plan): stop the kept daemon before its root is removed
§7 step 8 removed the kept runtime root while the graph session of
steps 4-7 may still have a daemon running under it; stop that daemon
under the sourced CBM_RUNTIME_DIR first. §13 Reproducibility still
cleared ~/.cache/codebase-memory-mcp/*.db and called the harness
unflagged, which no longer describes what the harness does: it indexes
into a run-private root, and only CBM_BENCH_KEEP_RUNTIME=1 hands that
root, via runtime-root.txt, to the graph phase.

Signed-off-by: Anton Standrik <astandrik@yandex-team.ru>
2026-10-27 12:57:37 +03:00
Anton Standrik 567ed5d87e fix(test): hand the benchmark index to the caller on request
The evaluation plan (docs/EVALUATION_PLAN.md §7) indexes a language with
benchmark-index.sh and then answers graph questions against that index
from its own MCP session. With a run-private runtime (#1696) the index
was gone before that session could start, so the handoff is now explicit
and opt-in.

With CBM_BENCH_KEEP_RUNTIME set, a SUCCESSFUL run stops its daemon,
leaves the private root in place and records the paths that reach it in
<results>/<lang>/runtime-root.txt (sourceable: CBM_BENCH_RUNTIME_ROOT,
CBM_RUNTIME_DIR, CBM_CACHE_DIR). Ownership of that root, including its
removal, passes to the caller. A failed run cleans up regardless: there
is no index worth keeping and nothing may leak. Nothing changes in the
default path or in the three timing files.

§7's skeleton sets the flag, sources the file before the graph session
and removes the root in step 8 instead of the live-store *.db files.

The contract test drives a kept run and requires the root to survive,
the handoff file to be sourceable, and its paths to be the ones the
product processes actually used; the unflagged run still asserts the
root is gone. The kept-run assertions fail against the previous head.

Signed-off-by: Anton Standrik <astandrik@yandex-team.ru>
2026-10-27 12:57:37 +03:00
Martin Vogel 95fc0d3518 Merge origin/main into fix/daemon-preserve-ui-setting-20260914
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-26 03:07:16 +01:00
Martin Vogel 0685110e22 Merge origin/main into feat/path-allow-broad-too-shallow-override
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-26 02:27:02 +01:00
Martin Vogel b260a4bf70 fix: preserve watcher roots and refresh options
Match canonical Windows separators across watch ownership and admission,
drain all session watches when auto_watch is disabled, and retain the
resolved doc_candidates choice for later refreshes. Add deterministic
regressions for the five observed failures and an absent-option guard.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-21 22:57:14 +02:00
wargloom 0325d6a3fa fix: watch explicit MCP index targets
Signed-off-by: wargloom <wargloom@gmail.com>
2026-10-21 14:03:07 +03:00
Martin Vogel 13c38feeff docs: refresh Lens recordings and correct README claims
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-20 22:39:10 +02:00
Martin Vogel 137996c43d docs: integrate community controls into the website navigation
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-20 20:12:04 +02:00
Martin Vogel 1d2c9bcf89 docs: place community badges in the website header
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-20 20:05:19 +02:00
Martin Vogel e81b6599a8 docs: center the MCP server while keeping Lens visuals up front
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-20 20:02:47 +02:00
Martin Vogel 912dae61c9 docs: add Lens walkthroughs and restore GitHub star badge
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-20 19:57:57 +02:00
Martin Vogel e77b494b3e docs: improve site discovery and invite the Discord community
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-20 19:53:16 +02:00
Martin Vogel cf1b443a16 Merge branch 'main' into feat/path-allow-broad-too-shallow-override 2026-10-20 19:45:03 +02:00
Martin VogelandMark Murawski 3e2de74e98 feat(workspace): record broad approvals with allow-root --approve-broad
Replace the PATH_ALLOW_BROAD environment variable with a recorded grant,
the shape agreed in review: `codebase-memory-mcp allow-root
--approve-broad <path>` records an explicit human approval for one root
refused as too broad (CBM_WS_DENY_TOO_SHALLOW), mirroring
--approve-sensitive end to end.

- cbm_workspace_grant_add() takes approve_broad next to
  approve_sensitive. Each flag lifts only its own verdict, absolute
  denials stay unliftable, and a refusal names the flag that would
  lift it.
- The approval is stored with a '^' marker, listed by allow-root --list
  as "(approved broad)", and honoured by cbm_workspace_root_allowed()
  only for CBM_WS_DENY_TOO_SHALLOW and only on an exact path match,
  keeping the exact-match rule of the original change.
- cbm_workspace_root_allowed() returns to its previous signature. Every
  caller (MCP index_repository and index-job start, auto-index, daemon
  sessions, the HTTP UI) reads the same grant store, so stdio and
  daemon sessions decide identically and nothing depends on the
  environment a daemon was started with.
- The too-broad refusal names `allow-root --approve-broad <path>`, a
  command a person runs.
- cbm_workspace_classify_root() and cbm_workspace_verdict_is_overridable()
  are unchanged.

The regression test keeps its name and its exact-match, sibling,
absolute and sensitive checks, now against the grant store, and adds
that a broad marker never lifts a sensitive verdict.

Co-authored-by: Mark Murawski <github@kobaz.net>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-20 19:26:31 +02:00
Martin Vogel dd357a7c97 docs: refresh project messaging and Lens website
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-20 19:08:27 +02:00
Oscarbol09 a933d5318c docs(troubleshooting): add Windows troubleshooting guide
Centralize recurring Windows-specific troubleshooting entries in a dedicated document linked from README.md. Each entry includes confirmed symptoms, affected version ranges, current workarounds, and canonical tracking issue references, updated to reflect v0.10.x and v0.11.0 status.

Refs #1170

Signed-off-by: Oscarbol09 <omaderabolano@correo.unicordoba.edu.co>
2026-10-19 18:45:28 -05:00
刘冲 1e4751d3ca fix(index): charge macOS phys_footprint and pin duration across recovery
Watchdogs now sample the OS-charged footprint instead of resident size on
Darwin, and index_max_duration_seconds covers the whole request so a
crash/hang respawn cannot reset the clock.

Signed-off-by: 刘冲 <mail@liuchong.dev>
2026-10-19 17:18:01 +08:00
刘冲 de1615264a feat(index): add worker resource watchdogs
Discovery limits bound what indexing accepts, not what it then costs. A
repository well inside those bounds can still exhaust the host through parser
memory, or simply never finish, and a supervised worker that hangs leaves the
parent waiting with nothing to report.

Add index_max_rss_mb and index_max_duration_seconds, enforced by the parent
against the worker process tree rather than the worker process alone, so a
runaway child cannot hide behind a small parent. Resident memory is sampled
through the platform interface on macOS, Linux and Windows. Crossing a limit
terminates the tree and yields one trusted, structured terminal result that
attributes the failure to the resource that caused it.

Both limits default to off. A measurement that cannot be taken fails the
attempt instead of passing it: a watchdog that quietly stops watching is
worse than no watchdog at all.

The shell fixture that stands in for the supervisor names the two new keys.
The worker accepts only a policy that spells out every key it knows, which is
what keeps a stale supervisor from starting a worker it cannot bound.

Signed-off-by: 刘冲 <mail@liuchong.dev>
2026-10-19 17:18:00 +08:00
Martin Vogel 57b557ced8 fix(test-impact): close the role table's fail-opens, follow literals through macros
The first commit of this branch is the Smart CI change as of the rebase
onto 9f85f104. A review of it found places where the engine could run
fewer tests than a change needs; each now runs everything or selects the
right tests, with a test that fails when its fix is reverted.

Engine:
- A `#define NAME "literal"` line counted as naming a role but selected
  nobody, so the tests that start the blocking-git probe through their
  marker macros would not have run. The scan now follows NAME, as a whole
  word, to the code that uses it, through chains of up to 4 macros; a
  define it cannot follow runs everything.
- main dispatches through the role table, so no edge leads from main to a
  handler. A table entry the engine cannot read, or whose handler is not
  exactly one function, was skipped; it now runs everything.
- In a runner file, only a test case names a role's literal. The runner's
  own helper that reads the marker no longer counts as a spawner, so a
  role only the runner names runs everything again.
- A handler reached first by a parse gap or by the spawn lift was never
  lifted. Role lifts and parse gaps now run to a fixpoint, before the
  runner check and again after the spawn lift.
- A reached sink that main calls (the blocking-git probe) counted as a way
  into main and hid the real one: #2644 now names the start-up path main
  -> cbm_index_supervisor_capture_build_fingerprint.
- No pointer past the end of a role line; the RUNNER_REACHED note clamps
  its prefix.

CI:
- pkg/npm/README.md, which test_cli reads, runs the test legs instead of
  the docs tier.
- The build rule lists the harness scripts the test legs run:
  run-test-wave.py, path-safety.sh, clean.sh.
- The revert guard rejects the ancestor's coverage when a diff fails.
- The vetoed selection is uploaded (test-selection-vetoed).

Docs: SMART_CI.md states the new fail-safe cases, the version that lacks
the new config keys, the selection base, and that the narrowed leg builds
with gcc while the coverage comes from clang.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-17 20:44:27 +02:00
Martin Vogel 7f6f567840 wip: Smart CI narrows PR CI for real (pre-rebase checkpoint)
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-17 14:48:52 +02:00
Martin Vogel 10c7fc3206 fix(pkg): remove the archive size caps from the npm, PyPI and Go wrappers
v0.12.0 could not be installed through npm, pnpm, pip or the Go wrapper on
any platform (#2657): each wrapper refused an archive member above 256 MiB,
and every v0.12.0 binary is 331-335 MB. The v0.11.0 binaries were already
about 300 MB, so the Go wrapper, which has had the cap since v0.10.0, was
broken before; npm and PyPI gained it in v0.12.0. The archive is verified
against the release's checksums.txt before it is unpacked, so a byte cap
only ever refused what we ship.

- npm, PyPI, Go: delete every byte-size cap (compressed archive, per member,
  aggregate, checksum manifest, download size). The checksum, the exact
  member set, path and link refusal, the member count, HTTPS and the
  --version check stay.
- All three honour CBM_DOWNLOAD_URL like install.sh, for testing: https, or
  plain http to an exact loopback authority with no proxy and no redirect.
- Smoke: scripts/smoke-wrappers.sh installs the three wrappers from the
  checkout against the release fixture and runs the binary each one
  installed. smoke-test.sh Phase 13w runs it; SMOKE_REQUIRE_WRAPPERS=1 makes
  it required on the PR smoke lanes and in the release smoke, which gates
  publishing.

Other install paths found broken while checking every channel:
- Homebrew: the formula was still at 0.10.3 and installed the dynamic Linux
  build, which needs glibc 2.38 (Ubuntu 22.04, Debian 12 and RHEL 9 lack it).
  It now installs 0.12.0 with the static -portable Linux assets and tracks
  the newest release in the version contract like the other surfaces.
- Go: `go install .../pkg/go/cmd/codebase-memory-mcp@vX.Y.Z` never worked
  (no pkg/go/v* tags, so Go fetched the whole repository, over its 500 MB
  module limit), and @latest built main's wrapper, whose version constant
  lags each release. The release now also tags pkg/go/vX.Y.Z, and the
  wrapper installs its own module version (the constant only for local and
  untagged builds).
- npm: a stable release also moves the `next` dist-tag to itself; `next`
  still pointed to 0.9.1-rc.1.
- Docs: winget and Chocolatey were listed as install channels but are not
  published; they are removed until they are. Windows arm64 ships and is
  now listed.

Fixes #2657.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-16 18:09:06 +02:00
Martin Vogel 01379f04ab Merge main into docs/readme-atlas-review
Resolves the four README conflicts against main 49424722: the README keeps
this branch's wording and style, and takes the content main added since
4d9592b5 in that style (list items "X: ..." instead of "X — ...", mid-
sentence dashes as semicolons):
- feature list and indexing pipeline: main's infrastructure-as-code
  bullets (container images, compose, Helm, Terraform, Service -> code);
- edge types: main's SPAWNS detail plus INFRA_MAPS, USAGE ref:image,
  DEPLOYS, DEPENDS_ON and CONFIGURES;
- trace_path: this branch's text (depth 1 to 15, tests excluded) plus
  main's topology / deploy / run modes.
Checked: the supported-agent README contract (45 surfaces, every agent),
the language-count contract (162 grammars), all 22 local links and images.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-13 21:59:25 +02:00