Skip to content

fix(prompts): include existing static artifact investigation routes - #6925

Closed
AyoubElleuch wants to merge 3 commits into
morluto:mainfrom
AyoubElleuch:codex/feature-investigation-static-routes
Closed

AyoubElleuch wants to merge 3 commits into
morluto:mainfrom
AyoubElleuch:codex/feature-investigation-static-routes

Conversation

@AyoubElleuch

@AyoubElleuch AyoubElleuch commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #6919.

investigate_feature currently directs files and app bundles toward native opening while omitting existing APK code, managed metadata, and Apple resource routes. The shared prompt now presents these optional starting points before native analysis, retaining JavaScript and archive inventory guidance.

Change and scope

Guidance only in src/contracts/promptContracts.ts. Target-free tools receive path=target_path; Apple resource tools use a resource-only session; native and archive tools retain their active-target requirements. APK code inspection is distinguished from archive-member inventory. The prompt preserves format uncertainty and directs callers to advertised tools and host/provider limitations, including the JADX MCP JAR/JDK requirement.

This is a routine clarification within existing capabilities; an advance maintainer scope decision is not applicable. No new detector, provider, execution authority, or automatic workflow is introduced.

Contract and boundary impact

  • Semantic owner: shared guided prompt contract, consumed by native MCP prompt registration and the recorded runtime prompt catalog.
  • CLI/MCP schemas and tool inventory: unchanged. Only rendered guidance changes.
  • Evidence and provenance: existing Observations, Inference, Unknowns, caller-context handling, and optional-step discipline remain.
  • Target interaction: rendering neither acquires a target nor executes analysis. The suggested tools retain their existing effects.
  • Package/install impact: none; generated catalogs and build outputs remain uncommitted.

Expected effects:

  • Documentation or usability only; no target interaction.

Evidence and regression coverage

Source inspection at base 3d4f55652 confirms the three routes were absent from this prompt and already documented in the authored skill. Existing MCP coverage checks rendering, unchanged tool inventory, context preservation, and zero analysis execution.

An executed SDK client against the built production stdio MCP server rendered APK-method, managed-method, Apple-resource, JavaScript, and native questions using nonexistent local paths. All five responses preserved context and included the relevant routes, prerequisites, uncertainty, and Evidence discipline; tool inventory stayed unchanged. This verifies guidance delivery, not model tool selection.

Validation performed

Windows x64, pinned Node.js 24.22.1 and npm 11.16.0:

  • npm run test:focused -- tests/boundary/mcp/promptMcp.test.ts — 13 passed.
  • npm run check — passed (typecheck, lint/module boundaries, formatting, unused-code, metadata, architecture guards).
  • npm run docs:check — passed, including 9 README consistency tests.
  • Built stdio MCP SDK probe — all five cases passed.
  • git diff --check — passed.

Compatibility, safety, and release

No schema or API breaking change, migration, or new target effects. Real JADX, managed-provider, Apple-resource, and native analysis were not exercised; this change only renders guidance. Agent-selection accuracy and token/latency/CPU/process-family-memory costs were not measured; no performance improvement is claimed.

Author readiness

Human owner: @AyoubElleuch

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@AyoubElleuch
AyoubElleuch marked this pull request as ready for review October 23, 2026 23:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T05:16:15.157284Z d24b6ee Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Medium impact] The reviewed changes appear safe to merge once the current required checks pass.

Summary

Adds existing static-artifact routes to investigate_feature and separates optional routes from workflow availability.

  • Feature investigations now suggest routes for more artifact types.
  • Scoped prompts keep required routes and hide unavailable optional ones.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  C["Shared prompt contracts"] --> S["Selected family scope"]
  S -->|Required tool missing| O["Omit workflow"]
  S -->|Required tools available| P["Remove disabled optional routes"]
  P --> N["Native prompts and updates"]
  P --> G["Guided workflow tool"]
  P --> I["Catalog identity and doctor"]
Loading

Reviews (2) · Last reviewed commit: "fix(prompts): preserve workflows in exis..." · Reviewed by Greptile

Comment thread src/contracts/promptContracts.ts Resolved
Comment thread tests/boundary/mcp/promptMcp.test.ts Resolved
@AyoubElleuch

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0761c733e

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/contracts/promptContracts.ts Resolved
@morluto

morluto commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Hey @AyoubElleuch, thanks for putting this together, the fix looks useful. What's left: Greptile is at 4/5 on the current head, mainly over "Existing scopes lose the workflow". Happy to merge once that's sorted.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

AyoubElleuch commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

@morluto @greptile-apps The “Existing scopes lose the workflow” regression is fixed in d24b6ee.

The root cause was treating every suggested route as a workflow availability requirement. Optional routes now declare their availability separately, and the shared family selector removes disabled routes while retaining workflows whose required tools are present. Native prompt registration (including updates), guided_workflows, doctor, and catalog identity use that same projection. The native route is separate from the optional archive route.

The original session,electron,direct,application,enhanced scope is restored in regression coverage. Full/compact stdio cases pass for both original and expanded scopes, plus Android alone; disabled calls are omitted and required-tool rejection remains. The wording finding is also addressed: delivery is compared with the owning renderer, with independent tool/argument/prerequisite checks rather than fixed explanatory sentences.

Validation on Windows x64 / Node 24.22.1 / npm 11.16.0: 15 prompt MCP tests, 6 production stdio MCP tests, 5 public CLI tests, and 9 source tests passed. Production MCP doctor is healthy with the original scope (5/5 prompts, matching catalog digest, successful binary_session call). Runtime build, pre-push check:fast and diff checks passed. Documentation validation passed, including 9 README consistency tests. The full npm run check passed typechecking, ordinary lint/module boundaries, formatting, unused-code/metadata and architecture checks, then failed when the typed-lint backend exited 1 and emitted non-JSON output; the cause is unconfirmed. A bounded typed-lint run on all five touched TypeScript files passed with zero errors (one existing unused-parameter warning). New-head CI is queued for runners. No real analysis provider or performance claim is made.

Please re-review this revision and consider merging once the current checks pass.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: d24b6ee4a3

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@AyoubElleuch AyoubElleuch closed this by deleting the head repository Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Recovered as #8972 after accidental deletion of the source fork. The replacement initially restores the exact reviewed commit d24b6ee; prior CI and review history are linked in its description. GitHub refused to reopen this PR because it remains attached to the deleted repository.

@morluto morluto added area: evidence Evidence, artifacts, and reconstruction bug Something isn't working labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Include existing static artifact routes in feature-investigation guidance

2 participants