CodeSnuffler Forgejo End-to-End historical review range codesnuffler-forgejo-live-20260629T084251745Z-99530373-9b9 #43

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-20260629T084251745Z-99530373-9b9.
Run started at: 2026-06-29T08:42:51.745Z.

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-20260629T084251745Z-99530373-9b9. Run started at: 2026-06-29T08:42:51.745Z. 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 High 2 2

Findings

1. Tool auth probe receives the wrong profile shape

Severity Category Confidence Location Status
High Correctness 96% container_image_controller/api.py:977 Open

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

Open finding in CodeSnuffler

Generate patch with CodeSnuffler

2. Persona compatibility alias remains in the instance model

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

The PR standardizes auth identity on instance_id, but AiToolInstanceConfig.persona_id remains as a runtime alias and other code/tests still use it. The local AGENTS policy explicitly forbids compatibility shims when a field is standardized away, so this leaves the old shape live instead of removed.

Open finding in CodeSnuffler

Generate patch with CodeSnuffler

Suggested fix: Remove the persona_id property and replace remaining internal reads/tests with instance_id; keep only rejection/absence tests for incoming persona_id payloads where useful.

![CodeSnuffler review banner](https://ops.codesnuffler.com/codesnuffler_review/assets/banner_majorIssues) ## CodeSnuffler Review Findings | Recommendation | Risk | Open findings | Files touched by findings | | --- | --- | ---: | ---: | | Request Changes | High | 2 | 2 | ### Findings #### 1. Tool auth probe receives the wrong profile shape | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | High | Correctness | 96% | `container_image_controller/api.py:977` | Open | Details for this finding were posted as an [inline review comment](https://forgejo.codesnuffler.com/jason-admin/CodeSnuffler-FJ/pulls/43#issuecomment-159) on the changed line. [Open finding in CodeSnuffler](https://ops.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-43/findings/1) [Generate patch with CodeSnuffler](https://ops.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-43/findings/1/fix) #### 2. Persona compatibility alias remains in the instance model | Severity | Category | Confidence | Location | Status | | --- | --- | ---: | --- | --- | | Medium | Maintainability | 90% | `app/ai_tools/instances.py:226-227` | Open | The PR standardizes auth identity on `instance_id`, but `AiToolInstanceConfig.persona_id` remains as a runtime alias and other code/tests still use it. The local AGENTS policy explicitly forbids compatibility shims when a field is standardized away, so this leaves the old shape live instead of removed. [Open finding in CodeSnuffler](https://ops.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-43/findings/2) [Generate patch with CodeSnuffler](https://ops.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-43/findings/2/fix) **Suggested fix:** Remove the `persona_id` property and replace remaining internal reads/tests with `instance_id`; keep only rejection/absence tests for incoming `persona_id` payloads where useful.
@ -949,3 +975,3 @@
f"TOOL_AUTH_STORAGE_KEY={session.auth_storage_key}",
f"TOOL_AUTH_HOST_PATH={host_dir}",
f"TOOL_AUTH_PROFILE_JSON={json.dumps(profile.probe_config(), sort_keys=True, separators=(',', ':'))}",
f"TOOL_AUTH_PROFILE_JSON={json.dumps(profile.controller_payload(), sort_keys=True, separators=(',', ':'))}",
Author
Owner

CodeSnuffler finding: Tool auth probe receives the wrong profile shape

Severity: High Category: Correctness

TOOL_AUTH_PROFILE_JSON is now populated with profile.controller_payload(), but the embedded probe script still reads profile["tool_container_paths"] and tool_container_mount_paths. controller_payload() exposes paths and mounts instead, so status_payload() will raise a KeyError for every probe/API-key container run before returning JSON.

Commit: Open commit d8a3fc420b05

Open finding in CodeSnuffler

Generate patch with CodeSnuffler

Suggested fix: Pass the probe-shaped payload here, or update TOOL_PROBE_CODE to consume the controller payload shape consistently before switching the environment value.

**CodeSnuffler finding:** Tool auth probe receives the wrong profile shape Severity: **High** Category: **Correctness** `TOOL_AUTH_PROFILE_JSON` is now populated with `profile.controller_payload()`, but the embedded probe script still reads `profile["tool_container_paths"]` and `tool_container_mount_paths`. `controller_payload()` exposes `paths` and `mounts` instead, so `status_payload()` will raise a KeyError for every probe/API-key container run before returning JSON. Commit: [Open commit `d8a3fc420b05`](https://forgejo.codesnuffler.com/jason-admin/CodeSnuffler-FJ/commit/d8a3fc420b055e04df1d203706b89b1f1261a9c1) [Open finding in CodeSnuffler](https://ops.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-43/findings/1) [Generate patch with CodeSnuffler](https://ops.codesnuffler.com/codesnuffler_review/forgejo-jason-admin-CodeSnuffler-FJ-pr-43/findings/1/fix) **Suggested fix:** Pass the probe-shaped payload here, or update `TOOL_PROBE_CODE` to consume the controller payload shape consistently before switching the environment value.
jason-admin closed this pull request 2026-06-29 08:47:36 +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!43
No description provided.