CodeSnuffler Forgejo End-to-End historical review range codesnuffler-forgejo-live-20260630T041807949Z-bd8cb7ec-69e #49

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-20260630T041807949Z-bd8cb7ec-69e.
Run started at: 2026-06-30T04:18:07.949Z.

Fixture range: f9d210eccd0075b6b39b606cea9b1376719aa062..d8a3fc420b055e04df1d203706b89b1f1261a9c1.
This two-commit AI Harness range stops before 404b386c removed stale persona and old-shape compatibility, so the review is expected to produce actionable findings.

Exercise the live Forgejo webhook review pipeline against a stable historical CodeSnuffler diff. Run marker: codesnuffler-forgejo-live-20260630T041807949Z-bd8cb7ec-69e. Run started at: 2026-06-30T04:18:07.949Z. Fixture range: f9d210eccd0075b6b39b606cea9b1376719aa062..d8a3fc420b055e04df1d203706b89b1f1261a9c1. This two-commit AI Harness range stops before 404b386c removed stale persona and old-shape compatibility, so the review 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 still sends removed persona_id query parameter

Severity Category Confidence Location Status
High Correctness 92% frontend/src/dev-shell/components/DevShellTerminal.vue:155 Open

dev_shell_websocket now reads instance_id, but the frontend terminal still sends persona_id. For runner auth commands launched from this component, any non-primary selected identity is dropped and the backend falls back to primary, so auth/login can target the wrong plugin instance.

Open finding in CodeSnuffler

Fix via CodeSnuffler

Suggested fix: Rename the prop to instanceId (or map the existing prop at the boundary) and send url.searchParams.set("instance_id", ...); update callers and tests to use the current field name.

2. AI review policy choices still expose persona_id

Severity Category Confidence Location Status
Medium Maintainability 90% app/settings/ai_review_policy/schemas.py:76 Open

The PR standardizes the AI tool identity shape around instance_id, but this response schema still exposes persona_id, and the generated frontend type/components continue consuming it. That leaves a public old-shape API in place, contrary to the repository's no-compatibility-shim policy for removed fields.

Open finding in CodeSnuffler

Fix via CodeSnuffler

Suggested fix: Replace this field with instance_id in the schema/service projection, regenerate frontend API types, and update the Vue label helpers to consume instance_id with user-facing text changed from persona terminology.

3. Persona alias remains as runtime compatibility shim

Severity Category Confidence Location Status
Medium Maintainability 86% app/ai_tools/instances.py:226-227 Open

AiToolInstanceConfig.persona_id remains as an alias for instance_id, and current code still calls it in storage paths. Because this PR removes/standardizes persona-shaped auth identity, keeping the alias and runtime reads preserves the old shape instead of completing the cleanup required by AGENTS.md.

Open finding in CodeSnuffler

Fix via CodeSnuffler

Suggested fix: Remove the persona_id property and replace remaining runtime uses such as config.persona_id in storage/materialization code with config.instance_id; keep only negative tests/docs that assert persona_id is rejected.

![CodeSnuffler review banner](https://providers.codesnuffler.com/codesnuffler_review/assets/banner_majorIssues) ## CodeSnuffler Review Findings | Recommendation | Risk | Open findings | Files touched by findings | | --- | --- | ---: | ---: | | Request Changes | Medium | 3 | 3 | ### Findings #### 1. Dev shell still sends removed persona_id query parameter | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | High | Correctness | 92% | `frontend/src/dev-shell/components/DevShellTerminal.vue:155` | Open | `dev_shell_websocket` now reads `instance_id`, but the frontend terminal still sends `persona_id`. For runner auth commands launched from this component, any non-primary selected identity is dropped and the backend falls back to `primary`, so auth/login can target the wrong plugin instance. [Open finding in CodeSnuffler](https://providers.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-49/findings/14) [Fix via CodeSnuffler](https://providers.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-49/findings/14/fix) **Suggested fix:** Rename the prop to `instanceId` (or map the existing prop at the boundary) and send `url.searchParams.set("instance_id", ...)`; update callers and tests to use the current field name. #### 2. AI review policy choices still expose persona_id | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | Medium | Maintainability | 90% | `app/settings/ai_review_policy/schemas.py:76` | Open | The PR standardizes the AI tool identity shape around `instance_id`, but this response schema still exposes `persona_id`, and the generated frontend type/components continue consuming it. That leaves a public old-shape API in place, contrary to the repository's no-compatibility-shim policy for removed fields. [Open finding in CodeSnuffler](https://providers.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-49/findings/15) [Fix via CodeSnuffler](https://providers.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-49/findings/15/fix) **Suggested fix:** Replace this field with `instance_id` in the schema/service projection, regenerate frontend API types, and update the Vue label helpers to consume `instance_id` with user-facing text changed from persona terminology. #### 3. Persona alias remains as runtime compatibility shim | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | Medium | Maintainability | 86% | `app/ai_tools/instances.py:226-227` | Open | `AiToolInstanceConfig.persona_id` remains as an alias for `instance_id`, and current code still calls it in storage paths. Because this PR removes/standardizes persona-shaped auth identity, keeping the alias and runtime reads preserves the old shape instead of completing the cleanup required by AGENTS.md. [Open finding in CodeSnuffler](https://providers.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-49/findings/16) [Fix via CodeSnuffler](https://providers.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-49/findings/16/fix) **Suggested fix:** Remove the `persona_id` property and replace remaining runtime uses such as `config.persona_id` in storage/materialization code with `config.instance_id`; keep only negative tests/docs that assert `persona_id` is rejected.
jason-admin closed this pull request 2026-06-30 05:03:47 +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!49
No description provided.