perf(profiles): allow lightweight profile listing - #52433
Closed
0disoft wants to merge 1 commit into
Closed
Conversation
0disoft
marked this pull request as ready for review
June 26, 2026 02:43
0disoft
force-pushed
the
task/profile-list-lightweight
branch
from
June 27, 2026 08:12
9c64dd6 to
bfa8533
Compare
19 tasks
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds opt-in lightweight profile listing so callers that only need profile names and directories do not pay every per-profile detail cost.
list_profiles()still returns the same fullProfileInfodata by default. New keyword-only flags let hot paths skip specific expensive details:include_modelskipsconfig.yamlparsinginclude_distributionskipsdistribution.yamlparsinginclude_descriptionskipsprofile.yamlparsinginclude_gateway_statusskips gateway PID/runtime-state checksinclude_skill_countskips recursiveskills/**/SKILL.mdcountinginclude_aliasskips wrapper alias scanninginclude_envskips.envexistence checksThis keeps detailed surfaces such as
hermes profile listand/api/profilesunchanged, while cheaper routing/sync paths use minimal profile records.Related Issue
N/A. I searched open issues/PRs for
profile list skills count performanceand did not find a direct duplicate.Type of Change
Changes Made
hermes_cli/profiles.pylist_profiles()with all defaults preserving current behavior.name/pathor a narrow subset of fields:list_profiles()test proving expensive helpers are not called when detail flags are disabled.How to Test
Focused profile listing tests:
Result:
5 passedDistribution metadata compatibility:
Result:
69 passedKanban roster behavior:
Result:
9 passedDashboard profile/session paths:
uv run --with pytest --with pytest-timeout --with pytest-xdist python -m pytest tests/hermes_cli/test_web_server.py -k "profiles_sessions or profiles_list" -qResult:
4 passed, 311 deselectedSession search:
Result:
47 passedUpdate profile skill sync:
Result:
2 passedSyntax and whitespace checks:
Result: passed.
I also tried a broader direct pytest run for
tests/hermes_cli/test_profiles.py tests/hermes_cli/test_profile_distribution.py tests/hermes_cli/test_kanban_decompose.py; the new/related tests passed, but 5 existing profile tests failed on this Windows direct-pytest environment because of existingcp949default decoding and Windows chmod mode behavior. I did not change those unrelated tests in this PR.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — N/A, internal API behavior documented in codecli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AFor New Skills
N/A.
Screenshots / Logs
N/A. This is an internal profile-listing performance path change.
AI assistance: this PR was prepared with Codex assistance; I reviewed the diff and ran the verification listed above.