CodeSnuffler Forgejo End-to-End historical review range codesnuffler-forgejo-live-20260710T171114901Z-e597f6c7-e91 #54

Closed
jason-admin wants to merge 2 commits from change_forgejo_end_to_end into base_forgejo_end_to_end
Owner

Exercise the live Forgejo webhook review pipeline against a stable historical CodeSnuffler diff.

Run marker: codesnuffler-forgejo-live-20260710T171114901Z-e597f6c7-e91.
Run started at: 2026-07-10T17:11:14.901Z.

Fixture range: f9d210eccd0075b6b39b606cea9b1376719aa062..d8a3fc420b055e04df1d203706b89b1f1261a9c1.
This stable two-commit AI Harness range is expected to produce actionable findings.

Exercise the live Forgejo webhook review pipeline against a stable historical CodeSnuffler diff. Run marker: codesnuffler-forgejo-live-20260710T171114901Z-e597f6c7-e91. Run started at: 2026-07-10T17:11:14.901Z. Fixture range: f9d210eccd0075b6b39b606cea9b1376719aa062..d8a3fc420b055e04df1d203706b89b1f1261a9c1. This stable two-commit AI Harness range is expected to produce actionable findings.
This completes Step 12 of the AI harness plugin-instance plan by replacing the tool auth container session contract's persona field with explicit plugin instance identity. Controller request and response schemas, auth image refs, build payloads, dev-shell websocket forwarding, Docker labels, container env, and shared probe metadata now carry plugin_id, instance_id, and driver_id.

The controller now rejects mismatched plugin or driver identity, uses PLUGIN_INSTANCE_ID instead of TOOL_PERSONA_ID in auth containers, and labels containers/images with current plugin and driver keys. The app-side auth container client and session helpers send the new payload shape without accepting the old persona_id request field.

Validated with: pytest for the container image controller client, AI tool auth containers, and container image controller integration files; compileall for touched controller/app/contract/test modules; git diff --check; targeted cleanup search for removed tool-auth persona fields, env vars, labels, and probe keys in the edited boundary.
Update the AI harness runtime/status layer to project current plugin instance identity through auth runtime summaries, raw probe normalization, storage inventory, setup details, generic auth helpers, and system report rows. Runtime/status models now carry plugin_id, instance_id, and driver_id without a persona_id field, while later runner and review-policy persona cleanup remains explicitly scoped to follow-up plan steps.

Validated with: pytest for the AI tool instance suite, focused homepage runtime/status cases, the configured harness plugin catalog case, AI tool schema unit tests, compileall for the touched backend/test modules, git diff --check, and targeted persona cleanup searches.
Author
Owner

CodeSnuffler review banner

CodeSnuffler Review Findings

Recommendation Risk Open findings Files touched by findings
Request Changes Medium 3 3

Findings

1. Dev shell auth commands ignore selected instance

Severity Category Confidence Location Status
Medium Correctness 93% app/dev_shell.py:320 Open

Details for this finding were posted as an inline review comment on the changed line.

Open finding in CodeSnuffler

Fix via CodeSnuffler

2. AI review policy API still exposes persona_id

Severity Category Confidence Location Status
Medium Correctness 90% app/settings/ai_review_policy/schemas.py:72-77 Open

The PR removes persona_id from the main AI tool status/auth contracts, but AiReviewPolicyAiToolInstanceChoiceResponse still publishes only persona_id and the generated frontend type plus settings UI still consume it. This leaves a public schema and frontend path on the removed identity name, contrary to the repository cleanup rule for schema field standardization.

Open finding in CodeSnuffler

Fix via CodeSnuffler

Suggested fix: Replace persona_id with the current identity fields needed by the UI, at minimum instance_id and likely plugin_id/driver_id; update service.py, regenerate frontend API types, and change AiReviewPolicySettings.vue labels/lookups to use instance_id.

3. Auth container env names no longer match runtime contract

Severity Category Confidence Location Status
Medium Correctness 82% container_image_controller/api.py:971-973 Open

Details for this finding were posted as an inline review comment on the changed line.

Open finding in CodeSnuffler

Fix via CodeSnuffler

![CodeSnuffler review banner](https://development.codesnuffler.com/codesnuffler_review/assets/banner_mediumIssues) ## CodeSnuffler Review Findings | Recommendation | Risk | Open findings | Files touched by findings | | --- | --- | ---: | ---: | | Request Changes | Medium | 3 | 3 | ### Findings #### 1. Dev shell auth commands ignore selected instance | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | Medium | Correctness | 93% | `app/dev_shell.py:320` | Open | Details for this finding were posted as an [inline review comment](https://forgejo.codesnuffler.com/jason-admin/CodeSnuffler-FJ/pulls/54#issuecomment-202) on the changed line. [Open finding in CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-54/findings/2) [Fix via CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-54/findings/2/fix) #### 2. AI review policy API still exposes persona_id | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | Medium | Correctness | 90% | `app/settings/ai_review_policy/schemas.py:72-77` | Open | The PR removes `persona_id` from the main AI tool status/auth contracts, but `AiReviewPolicyAiToolInstanceChoiceResponse` still publishes only `persona_id` and the generated frontend type plus settings UI still consume it. This leaves a public schema and frontend path on the removed identity name, contrary to the repository cleanup rule for schema field standardization. [Open finding in CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-54/findings/3) [Fix via CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-54/findings/3/fix) **Suggested fix:** Replace `persona_id` with the current identity fields needed by the UI, at minimum `instance_id` and likely `plugin_id`/`driver_id`; update `service.py`, regenerate frontend API types, and change `AiReviewPolicySettings.vue` labels/lookups to use `instance_id`. #### 3. Auth container env names no longer match runtime contract | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | Medium | Correctness | 82% | `container_image_controller/api.py:971-973` | Open | Details for this finding were posted as an [inline review comment](https://forgejo.codesnuffler.com/jason-admin/CodeSnuffler-FJ/pulls/54#issuecomment-204) on the changed line. [Open finding in CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-54/findings/4) [Fix via CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-54/findings/4/fix)
@ -316,3 +318,3 @@
async def dev_shell_websocket(websocket: WebSocket) -> None:
command_id = websocket.query_params.get("command", "bash")
persona_id = websocket.query_params.get("persona_id")
instance_id = websocket.query_params.get("instance_id")
Author
Owner

CodeSnuffler finding: Dev shell auth commands ignore selected instance

Severity: Medium Category: Correctness

dev_shell_websocket now reads only the instance_id query parameter, but the dev-shell frontend still sends persona_id from DevShellTerminal.vue. For non-primary personas/instances, runner auth websocket commands will fall back to primary and operate on the wrong auth storage. Update the frontend query parameter to instance_id and adjust prop/type naming as needed rather than accepting both names.

Commit: Open commit d8a3fc420b05

Open finding in CodeSnuffler

Fix via CodeSnuffler

Suggested fix: Change frontend/src/dev-shell/components/DevShellTerminal.vue to send instance_id instead of persona_id, and update any related frontend naming/types.

**CodeSnuffler finding:** Dev shell auth commands ignore selected instance Severity: **Medium** Category: **Correctness** `dev_shell_websocket` now reads only the `instance_id` query parameter, but the dev-shell frontend still sends `persona_id` from `DevShellTerminal.vue`. For non-primary personas/instances, runner auth websocket commands will fall back to `primary` and operate on the wrong auth storage. Update the frontend query parameter to `instance_id` and adjust prop/type naming as needed rather than accepting both names. Commit: [Open commit `d8a3fc420b05`](https://forgejo.codesnuffler.com/jason-admin/CodeSnuffler-FJ/commit/d8a3fc420b055e04df1d203706b89b1f1261a9c1) [Open finding in CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-54/findings/2) [Fix via CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-54/findings/2/fix) **Suggested fix:** Change `frontend/src/dev-shell/components/DevShellTerminal.vue` to send `instance_id` instead of `persona_id`, and update any related frontend naming/types.
@ -945,3 +970,2 @@
env = [
f"TOOL_ID={profile.tool_id}",
f"TOOL_PERSONA_ID={session.persona_id}",
f"DRIVER_ID={profile.tool_id}",
Author
Owner

CodeSnuffler finding: Auth container env names no longer match runtime contract

Severity: Medium Category: Correctness

The controller now injects DRIVER_ID but no TOOL_ID or AI_TOOL_DRIVER_ID, while the documented auth-container contract still specifies TOOL_ID, PLUGIN_ID, PLUGIN_INSTANCE_ID, and AI_TOOL_DRIVER_ID. Any auth adapter or external plugin built against that contract will stop seeing the documented tool/driver identifiers.

Commit: Open commit d8a3fc420b05

Open finding in CodeSnuffler

Fix via CodeSnuffler

Suggested fix: Either emit the documented current names (TOOL_ID and AI_TOOL_DRIVER_ID) with PLUGIN_ID/PLUGIN_INSTANCE_ID, or update the contract and all adapter consumers in the same change so there is only one current env shape.

**CodeSnuffler finding:** Auth container env names no longer match runtime contract Severity: **Medium** Category: **Correctness** The controller now injects `DRIVER_ID` but no `TOOL_ID` or `AI_TOOL_DRIVER_ID`, while the documented auth-container contract still specifies `TOOL_ID`, `PLUGIN_ID`, `PLUGIN_INSTANCE_ID`, and `AI_TOOL_DRIVER_ID`. Any auth adapter or external plugin built against that contract will stop seeing the documented tool/driver identifiers. Commit: [Open commit `d8a3fc420b05`](https://forgejo.codesnuffler.com/jason-admin/CodeSnuffler-FJ/commit/d8a3fc420b055e04df1d203706b89b1f1261a9c1) [Open finding in CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-54/findings/4) [Fix via CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-54/findings/4/fix) **Suggested fix:** Either emit the documented current names (`TOOL_ID` and `AI_TOOL_DRIVER_ID`) with `PLUGIN_ID`/`PLUGIN_INSTANCE_ID`, or update the contract and all adapter consumers in the same change so there is only one current env shape.
jason-admin closed this pull request 2026-07-10 17:18:27 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jason-admin/CodeSnuffler-FJ!54
No description provided.