Repository navigation
fix(daemon): log the effective auto_index_limit in daemon.autoindex.skipped - #2777
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
…kipped When daemon-backed auto-indexing refuses a repository, the daemon.autoindex.skipped warning reported the tracked-file count but not the limit that caused the refusal. The MCP autoindex.skip event already carries limit=<n> (DeusData#1466); add the same field to the daemon warning, using the auto_index_limit value the admission check already used. Admission behavior is unchanged. daemon_application_auto_index_honors_tracked_file_limit now captures the warning through a log sink and asserts reason=too_many_files, files=1 and limit=0 as whole fields. Fixes DeusData#1818 Signed-off-by: Gaurav Dubey <gauravdubey0107@gmail.com>
d07f919 to
32272f9
Compare
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
|
Thanks again @gaurav0107 - this is a careful, focused fix for #1818. We merged current main into your branch (one signed-off merge commit, ca41963; your commit is unchanged) so CI can re-run against the latest daemon changes from #2737, which touched the same two files. No action needed, but please pull before pushing again. We will merge once the fresh checks are green. |
|
Merged as e73eb9d - thank you, @gaurav0107! daemon.autoindex.skipped now logs the effective auto_index_limit, so it is clear why a project was skipped (fixes #1818). Thanks also to @rarepops for the original report. |
What does this PR do?
Fixes #1818. When daemon-backed auto-indexing refuses a repository,
daemon.autoindex.skippedinapplication_background_initialize_impl()(src/daemon/application.c) loggedproject,reasonandfiles, but not the limit that caused the refusal. This addslimit=<effective auto_index_limit>, formatted the same way as the MCPautoindex.skipevent from #1779. The value is theauto_index_limitthe admission checkcbm_mcp_auto_index_within_file_limit()already used. Admission behavior is unchanged, as you asked in the issue.Before / after, from the binding test fixture (1 tracked file,
auto_index_limit=0):The field is also added on the
unsafe_or_unavailable_pathbranch. It's the same log call, and the MCP event carrieslimiton both branches too.Credit to @rarepops, who reported and confirmed this. You invited them to open the PR on Sep 26. Nothing had been opened four weeks later, so I picked it up. I'm happy to close this if they'd rather send their own.
Tests
daemon_application_auto_index_honors_tracked_file_limitintests/test_daemon_application.calready drives this branch. It now installs a log sink around the initialize/admission wait and asserts that the captureddaemon.autoindex.skippedline carriesreason=too_many_files,files=1andlimit=0as whole fields, solimit=00would not match. The warning is emitted on the background-initialize thread before the release increment thatapp_wait_for_background_initializes()waits on. The sink publishes through anatomic_bool. The sink, level and format are restored before any assert.Evidence
Machine: Amazon Linux 2023, x86_64, clang 15.0.7 (ASan+UBSan, default
Makefile.cbmtest flags).On main, the earlier assertions in the test (skip line captured,
reason=too_many_files,files=1) pass. Only thelimit=0assertion fails.Not verified locally
scripts/lint.sh: cppcheck and clang-format-20 aren't installed here.git diff -U0 upstream/main..HEAD | clang-format-diff -p1(clang-format 15) is empty. ThelintCI job (cppcheck + clang-format-20) passed on this PR.scripts/test.shvenue run. I ran only the suites above.Checklist
git commit -s):scripts/check-dco.sh upstream/main..HEADOKmake -f Makefile.cbm test): daemon_application, cli, mcp, daemon_runtime and daemon_ipc pass (see above); the full run was not done locallymake -f Makefile.cbm lint-ci): not run locally; thelintCI job passed (see above)🤖 Opened with Superhuman, an open-source contribution agent.