CodeSnuffler Forgejo End-to-End historical review range codesnuffler-forgejo-live-20260630T012810915Z-8a0f006b-c1c #47

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-20260630T012810915Z-8a0f006b-c1c.
Run started at: 2026-06-30T01:28:10.915Z.

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-20260630T012810915Z-8a0f006b-c1c. Run started at: 2026-06-30T01:28:10.915Z. 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 1 1

Findings

1. Remove the remaining persona_id compatibility alias

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

This PR removes persona_id from auth-container schemas and payloads, but AiToolInstanceConfig still exposes persona_id as a property returning instance_id. That keeps the old shape alive and current code still consumes it, for example storage deletion and runner workspace materialization. Under the repository's no-shim policy, the old field/alias should be removed rather than retained as a compatibility path.

Open finding in CodeSnuffler

Generate patch with CodeSnuffler

Suggested fix: Delete the persona_id property and update remaining internal consumers/tests to use instance_id directly; then search for persona_id and leave only negative tests or docs that explicitly reject the old field.

![CodeSnuffler review banner](https://ops.codesnuffler.com/codesnuffler_review/assets/banner_mediumIssues) ## CodeSnuffler Review Findings | Recommendation | Risk | Open findings | Files touched by findings | | --- | --- | ---: | ---: | | Request Changes | Medium | 1 | 1 | ### Findings #### 1. Remove the remaining persona_id compatibility alias | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | Medium | Maintainability | 90% | `app/ai_tools/instances.py:226-227` | Open | This PR removes `persona_id` from auth-container schemas and payloads, but `AiToolInstanceConfig` still exposes `persona_id` as a property returning `instance_id`. That keeps the old shape alive and current code still consumes it, for example storage deletion and runner workspace materialization. Under the repository's no-shim policy, the old field/alias should be removed rather than retained as a compatibility path. [Open finding in CodeSnuffler](https://ops.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-47/findings/8) [Generate patch with CodeSnuffler](https://ops.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-47/findings/8/fix) **Suggested fix:** Delete the `persona_id` property and update remaining internal consumers/tests to use `instance_id` directly; then search for `persona_id` and leave only negative tests or docs that explicitly reject the old field.
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 still sends ignored persona query parameter

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

The backend now reads instance_id from the websocket query, but the dev-shell terminal still sends persona_id. For non-primary AI tool instances, runner auth commands will fall back to primary instead of the selected instance.

Open finding in CodeSnuffler

Generate patch with CodeSnuffler

Suggested fix: Send instance_id here and update the prop naming/callers so the frontend and app/dev_shell.py agree on the current field name.

2. AI review policy choices still expose old persona_id shape

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

This response schema still publishes persona_id for AI tool instance choices while the PR standardizes AI tool identity on instance_id. Under the repo's no-compatibility-shim policy, this old API shape should be removed rather than preserved alongside the new identity fields.

Open finding in CodeSnuffler

Generate patch with CodeSnuffler

Suggested fix: Rename the schema/dataclass/frontend generated type and Vue consumers to instance_id, then remove the persona_id=instance.instance_id projection.

3. AiToolInstanceConfig retains persona_id compatibility alias

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

AiToolInstanceConfig.persona_id remains as a runtime alias for instance_id, and several callers still read it. The PR removes persona_id from some schemas, so keeping this alias is a stale compatibility shim that conflicts with the repository cleanup policy.

Open finding in CodeSnuffler

Generate patch with CodeSnuffler

Suggested fix: Delete the persona_id property and update remaining AI-tool callers to use instance_id directly; leave only tests that assert old input fields are rejected where useful.

![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 still sends ignored persona query parameter | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | Medium | Correctness | 92% | `frontend/src/dev-shell/components/DevShellTerminal.vue:155` | Open | The backend now reads `instance_id` from the websocket query, but the dev-shell terminal still sends `persona_id`. For non-primary AI tool instances, runner auth commands will fall back to `primary` instead of the selected instance. [Open finding in CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-47/findings/5) [Generate patch with CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-47/findings/5/fix) **Suggested fix:** Send `instance_id` here and update the prop naming/callers so the frontend and `app/dev_shell.py` agree on the current field name. #### 2. AI review policy choices still expose old persona_id shape | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | Medium | Maintainability | 88% | `app/settings/ai_review_policy/schemas.py:72-77` | Open | This response schema still publishes `persona_id` for AI tool instance choices while the PR standardizes AI tool identity on `instance_id`. Under the repo's no-compatibility-shim policy, this old API shape should be removed rather than preserved alongside the new identity fields. [Open finding in CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-47/findings/6) [Generate patch with CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-47/findings/6/fix) **Suggested fix:** Rename the schema/dataclass/frontend generated type and Vue consumers to `instance_id`, then remove the `persona_id=instance.instance_id` projection. #### 3. AiToolInstanceConfig retains persona_id compatibility alias | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | Low | Maintainability | 84% | `app/ai_tools/instances.py:226-227` | Open | `AiToolInstanceConfig.persona_id` remains as a runtime alias for `instance_id`, and several callers still read it. The PR removes `persona_id` from some schemas, so keeping this alias is a stale compatibility shim that conflicts with the repository cleanup policy. [Open finding in CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-47/findings/7) [Generate patch with CodeSnuffler](https://development.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-47/findings/7/fix) **Suggested fix:** Delete the `persona_id` property and update remaining AI-tool callers to use `instance_id` directly; leave only tests that assert old input fields are rejected where useful.
jason-admin closed this pull request 2026-06-30 02:40:35 +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!47
No description provided.