Skip to content

Raise jCodeMunch file cap to 8000 with measured consolidation headroom - #962

Merged
seathatflowsinourveins merged 1 commit into
mainfrom
codex/ns2604-jcodemunch-file-cap-20261010
Oct 10, 2026
Merged

seathatflowsinourveins merged 1 commit into
mainfrom
codex/ns2604-jcodemunch-file-cap-20261010

Conversation

@seathatflowsinourveins

Copy link
Copy Markdown
Owner

Scope

The repository's conservative jCodeMunch coverage test has only 26 retained-candidate slots below its 4,000-file cap on main. A synthetic consolidation wave adding 1,000 source paths reproduces the failure at 4,974 candidates. Raise max_folder_files to 8,000, leaving 4,026 slots above current main and 3,026 above that wave; exclusions and context_providers:false retain their existing values.

  • Base commit: f6ae0de74c151dce9204f6b6bdae7ea048932881 (freshly fetched main).
  • Lane: lane:shared; the root indexing configuration serves both lanes, and two existing shared evidence file rows are refreshed. Other-lane acknowledgement remains a landing gate.
  • Owned paths touched: .jcodemunch.jsonc, tests/test_jcodemunch_config.py, and manifests/evidence.json (two existing SHA256/byte-length rows).
  • This is the separate urgent cap PR for the consolidation's first landing, before further file-adding slices. The CC owns landing order and merge.

SOTA sources

Installed CLI --version and Python distribution metadata both report jgravelle/jcodemunch-mcp 1.108.333, newer than the repository's historical 1.108.319 comments. The official v1.108.333 tag resolves to commit bbe30fa299c4f82251233f25b8a0c5c56e2d407a; changed citations follow that installed pin.

  • security.py L587–592 and L717–743: upstream defaults to 2,000 local-folder files and supports a positive project override.
  • config.py L1145–1152 and L1278–1305: the project key overlays global settings and loads UTF-8 JSONC from the requested root. The schema/JSONC citations are updated to L542–548/L642–739.
  • tools/index_folder.py L1231–1234 and L1685–1692: both discovery paths resolve the cap from the walked-root key. L1395–1397 records cap drops in file_limit; L3206–3220 defines native counts/duration. Existing provider gate at L798–804 stays disabled.
  • server.py L11010–11056: the supported jcodemunch-mcp index TARGET --no-ai-summaries command calls upstream index_folder synchronously and uses CODE_INDEX_PATH for isolated storage. No index implementation or fork was added.
  • Installed systemd 259's systemd-run(1)/systemd.resource-control(5) define user scopes, MemoryHigh/MemoryMax/MemorySwapMax and MemoryPeak; native scope property readback below verifies the requested limits on this run.

Evidence-class table

Claim Evidence class Command / receipt
Old cap fails with consolidation headroom; new cap passes synthetic New test through the existing run_coverage/mocked Git-inventory seam adds 1,000 retained .py paths. At 4,000 it fails with 4974 candidates reach cap 4000; at 8,000 it passes.
Current-main coverage protections and configuration schema still pass local_integration python3 -B -m unittest tests.test_jcodemunch_config: nine tests, rc 0; 12,123 tracked, 8,149 ignored, 3,974 candidates, margin 4,026.
Native main indexing completes at the new cap within the requested scope native_proven Supported CLI on detached main with only its cap line changed: rc 0; wall 54.33 s; scope MemoryPeak 444,997,632 bytes (424.383 MiB); 2,563 files, 68,160 symbols, file_limit=0. Receipt SHA256 eaf249c613aad1928106c7675ab0b23dddbc90cefd3f3056edefb80f376a8686.
FULL integrity/scope checks pass local_integration python3 scripts/validate.py: rc 0; 11,331 hashes, 70 components, four profiles, 239 receipts.
Explicit PR-range scan has no findings local_integration gitleaks 8.30.1, f6ae0de74c151dce9204f6b6bdae7ea048932881..HEAD: one commit, no leaks, rc 0.
Project override/cap/result semantics match the installed upstream source_review Installed 1.108.333 source and tag/commit above.

Local commands run

python3 -m unittest tests.test_jcodemunch_config.JCodeMunchCoverageRegressionTests.test_retained_wave_sources_fit_configured_cap -v
# Before config change: rc 1, 4,974 candidates reach cap 4,000.
# After config change: rc 0, margin 3,026.
python3 -B -m unittest tests.test_jcodemunch_config
# Nine tests pass, rc 0; current main margin 4,026.
systemd-run --user --scope --unit=ns2604-jcodemunch-cap-20261010-065527.scope -p MemoryAccounting=yes -p MemoryHigh=10G -p MemoryMax=14G -p MemorySwapMax=0 nice -n 10 ionice -c3 sh ~/.local/state/native-agent-stack/research/harness-rules-20261010/JCODEMUNCH-CAP-MEASURE.sh /var/tmp/ns2604-jcodemunch-cap-main-20261010 ns2604-jcodemunch-cap-20261010-065527.scope
# Wrapper runs: jcodemunch-mcp index /var/tmp/ns2604-jcodemunch-cap-main-20261010 --no-ai-summaries
# CODE_INDEX_PATH=/var/tmp/ns2604-jcodemunch-cap-index-20261010, JCODEMUNCH_CONTEXT_PROVIDERS=0, JCODEMUNCH_SHARE_SAVINGS=0.
# Native CLI and scope rc 0; wall 54.33 s; scope peak 444,997,632 bytes.
python3 scripts/validate.py
# FULL rc 0; 11,331 hashes, 70 components, four profiles, 239 receipts.
gitleaks git --log-opts=f6ae0de74c151dce9204f6b6bdae7ea048932881..HEAD --redact --no-banner
# One PR-range commit; no leaks; rc 0.
git diff --check
# rc 0.

Native scope readback while its measurement wrapper remained alive: MemoryHigh=10,737,418,240 bytes, MemoryMax=15,032,385,536 bytes, MemorySwapMax=0, MemoryPeak=444,997,632 bytes. The native internal duration is 52.33 s; /usr/bin/time CLI wall is 54.33 s. The detached main checkout is exactly f6ae0de74 with only max_folder_files changed. The isolated index store leaves the shared production index untouched.

The measured workload is current main at cap 8,000; it is not an 8,000-file benchmark. The conservative 3,974-candidate Git inventory differs from the native 2,563 indexed-file count because upstream language/size/secret/ignore filters remain active. No complete-source-coverage or future-workload memory claim is made. The cap doubles a finite bound and leaves about one current-main inventory of growth; the permanent wave regression checks 1,000 additional retained paths without hiding source behind new exclusions.

Decision record

~/.local/state/native-agent-stack/research/harness-rules-20261010/JCODEMUNCH-CAP-20261010.md records sources, test-first failure, native time/memory/counts, gates and publication. Native structured receipt: JCODEMUNCH-CAP-NATIVE-MEASUREMENT-20261010.json, SHA256 eaf249c613aad1928106c7675ab0b23dddbc90cefd3f3056edefb80f376a8686. A wave that consumes the remaining margin, or a measured workload that exceeds the resource envelope, would require another source-backed capacity choice.

Host evidence

No host default or shared production index is changed. The native measurement uses an owned detached main checkout and owned index store under /var/tmp, with only its own transient scope limited.

Checklist

  • No workflow/security permission changes or new dependency.
  • No credentials printed/read/copied, no new required secret.
  • No paid hosting/subscription/billing surface.
  • Peer-owned files, held PR heads and protected lanes preserved.
  • Failing-first regression, native measurement, FULL validation and explicit PR-range scan pass.
  • CC read and other-lane acknowledgement requested; current-head CI/landing remain CC-owned gates.

@seathatflowsinourveins seathatflowsinourveins added the lane:shared Touches files owned by both lanes; needs both lanes' acknowledgement label Oct 10, 2026
@seathatflowsinourveins
seathatflowsinourveins marked this pull request as ready for review October 10, 2026 08:41
@seathatflowsinourveins
seathatflowsinourveins merged commit 86bb669 into main Oct 10, 2026
36 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the codex/ns2604-jcodemunch-file-cap-20261010 branch October 10, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:shared Touches files owned by both lanes; needs both lanes' acknowledgement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant