Repository navigation
feat(guidance): search installed workflow sections - #6996
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge; no new blocking issue was found. SummaryAdds shared CLI/MCP search and retrieval for the eight installed workflow guides.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
CLI["CLI guidance"] --> Shared["Shared search/read operation"]
MCP["MCP guidance tools"] --> Shared
Shared --> Admission["Admit once; create child resource owner"]
Admission --> Bundle["Read eight fixed guides with size bounds"]
Bundle --> Parser["Parse bounded sections"]
Parser --> Search["Rank and page matches"]
Parser --> Read["Check locator and return section"]
Admission --> Cleanup["Release resources or retain exact cleanup owner"]
Reviews (9) · Last reviewed commit: "test(guidance): bound lifecycle gates an..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff9bfe508a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7de4dce921
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…search # Conflicts: # docs/mcp-prompts.md # src/cli.ts # src/cliCommandNames.ts # src/contracts/applicationToolContracts.ts # src/contracts/toolEffects.ts # src/server/registerApplicationTools.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2a7876eb9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9638b6d77b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Baseline CI audit for final head
The operator explicitly authorized merging around demonstrated main failures. The bypass is limited to the baseline failure and its dependent/cancelled CI outcomes above; no failing PR behavior was left unresolved. The PR body retains the original contributor's readiness declarations and records the validation limits. |
Summary
Fixes #6916. Analysts can find a workflow section with
rea guidance --query "exact JavaScript module"or MCPsearch_guidance, then retrieve the selected section by locator with--action read/read_guidance_section. This continuation preserves the contributor history and integrates mainf25d1e3e9.Search reads only the eight installed
MANAGED_SKILL_FILES; responses identify documentation rather than analysis results or Evidence. No target/provider is required or executed and no arbitrary directory or external service is accessed. This stays within the existing local documentation boundary.Shared implementation and bounds
CLI/MCP share application search/retrieval and one ATX section parser. Every non-generic query word must occur in a section; generic-only or unmatched subjects return scoped
no_matches, without a capability claim. Ranking and query/bundle-bound paging are deterministic. Bundle bytes are re-read on every operation; changed content produces stale locators/cursors. No new cache is retained.bundle_unavailable, with no partial index or inferred absence. First-close and retry cleanup failures remain errors carrying the exact live lease. CLI shutdown settles both JavaScript/guidance owners; reusable CLI workers and dispatcher fixtures use the shared cleanup entrypoint. Unrelated Android/browser formatting was excluded.Executed validation
Linux x64, Node 24.22.1 / npm 11.16.0; head
465a262ee(runtime unchanged fromb667c16be):b667c16be, and again on local candidate2d389f6c5merging final head465a262eewith current main131fbe075, including public CLI/MCP, advertised schemas, paging/staleness, filesystem/symlink/size bounds, dispatcher/closed-pipe behavior, cleanup retry, mixed close outcomes and reusable CLI workers. Seven original boundary failures and both shutdown regressions were reproduced before their fixes. Final test-only follow-up465a262eereruns the four lifecycle tests and type/lint checks; gates now use bounded acknowledgement and unconditional release/join/close. Two temporary negative controls (early operation settlement and failed assertions, including denied cleanup) each produce the expected three failures and exit in about 1.2 s; restored tests pass.check:fast, formatting,git diff --check, docs (9 README tests), catalog validation, and discovery (2,824 files exactly once) pass. Catalog check ran before the latest main-only integration; final CI checks the merged head.modulepagination retains all 19 results without duplicates, omissions or reordering.CI baseline and current-main verification
CI 40840282556 tests merge
df89030baon main3503578f9: 21,777 source tests pass /16 skip across 1,172 files. Built shard 8 passes. Shard 5 has one failure in the unchangedbundleComparisonMcp.test.ts:168: it expects a legacyleft_bundle_path: ...text substring while validation returns structured field issues. Pure main3503578f9reproduces the identical failure (8 pass /1 fail) withnpm run test:focused -- tests/boundary/mcp/bundleComparisonMcp.test.ts. Matrix fail-fast cancels the other six shards; they are unverified on this run, not reported as passing. Platform results remain in the linked run. This is the only observed failed test; the operator explicitly authorized bypass for demonstrated main failures.Current-main candidate
2d389f6c5(tree4f2e5359223864fc9876e00e49328fe021ef16e3, parents main131fbe075and final head465a262ee) merges cleanly, passes all 181 focused tests /17 files, type/lint and diff checks. Its updated installed bundle is 152,417 bytes /8 guides /69 headings; independent CommonMark maps, real recipe search/read, all 19 module results and live drift/restore pass again. Greptile gives 5/5 on exact final head, with all eleven threads resolved. Codex could not review the final head because the repository review quota is exhausted.Completed-task measurements
Before
1af45280eis the original implementation integrated on the same main base; aftercb60adf28includes the fixes. Two alternating/reversed repetitions per revision/workflow, fresh client/server sessions, warm OS caches; compile-cache state not independently controlled.applicationfamily and compact input schemas; initialization/instructions, catalog, requests, replies, notifications and both text/structured representations are counted.The recipe's chosen answer stays the same; requiring complete meaningful-term coverage reduces candidate sections from 41 to 11. Single-word pagination remains identical at 19 entries. Catalog 268,264 → 268,268 estimated tokens; compact locators offset that small addition. These whole-task measurements establish no overall speedup.
After the latest main integration, two more guarded tasks pass: recipe 272,133 tokens /3.632 s /4.72 CPU s /456.3 MiB; pagination 280,189 /3.818 s /4.93 CPU s /456.8 MiB. Historical comparisons remain pinned above. After the lifecycle fix, the same two tasks pass again: recipe 3.987 s /5.22 CPU s /454.7 MiB; paging 4.110 s /5.30 CPU s /453.8 MiB. Token counts remain 272,133 /280,189; no guard stop or surviving process. The live freshness/restore test also passes again.
The latest-main candidate also completes guarded recipe/paging tasks: 272,148 /280,204 tokens; 2.330 /2.496 s; 3.24 /3.42 CPU s; 455.5 /453.4 MiB. Its catalog is 268,283 tokens; updated main accounts for the changed catalog and guide bytes. These are additional observations, not an equivalent-base speed comparison. No guard stops or survivors.
A separate bounded diagnostic found a pre-linear title-cleanup expression took 440 ms for 16K internal spaces; the current complete section parser took 0.037 ms for that input and 0.108 ms at 64K. These have different scopes and are not a whole-workflow speed claim. The million-heading case was source-derived and deliberately not executed; a tiny boundary fixture proves refusal before expansion.
Tokenx 1.3.0 provides transport estimates, not billed model/context tokens. RSS is a 10 ms client/server process-group sum; CPU includes both and excludes the external sampler. A 1.5 GiB family/150 s guard bounds runs; all final measured tasks complete with no guard stops or survivors. Cold caches, full-schema discovery and OS-enforced network denial are unmeasured. One incomplete measurement preflight used the wrong legacy root-union payload shape; it cost 269,925 estimated tokens /3.392 s /4.58 CPU s /452.9 MiB, is retained separately and is not represented as passing. The corrected client follows the advertised SDK projection.
Author readiness
Human owner: @Deepak-Kambala
Before merge
type(scope): outcome.