Use schema options for session permission mode#2087
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
quad341
left a comment
There was a problem hiding this comment.
@julianknutsen — first, thank you. This is genuinely excellent work and we want to ship it. Replacing the persisted real_world_app_session_kind discriminator with the metadata-derived UseAgentTemplateForProviderResolution helper (with the legacy reader keeping old beads working) untangles a real class of provider/agent collision bugs, and the truth-table tests in internal/session/provider_resolution_test.go plus the wake-in-flight grace boundary tests are exactly the shape we want. @csells's approval still stands.
The only thing in the way is the CONFLICTING merge state, and I tried to take that on my side and my automation tapped out — almost certainly because of the scope of the regeneration step, not anything about your code. Rather than make you wait while I rework the maintainer-side tooling, could you do one rebase pass and let it ride?
Concretely, the one thing I need:
- Rebase
fix/pr1931-schema-optionsonto freshmain. - Regenerate the conflicted artifacts rather than hand-merging them:
cmd/gc/dashboard/web/src/generated/{index.ts,schema.d.ts,sdk.gen.ts,types.gen.ts}— viamake dashboard-check.docs/schema/openapi.json,docs/schema/openapi.txt,internal/api/openapi.json,internal/api/genclient/client_gen.go— via the OpenAPI/genclient regeneration step from the Huma source of truth.docs/reference/cli.md— via the doc-generation step.
- For the non-generated conflicts (handler_sessions.go, session_runtime.go, handler_session_create.go, cmd_session.go, worker_handle.go), keep your helper-based call patterns — those are the substantive contribution and they're right.
- Push. I'll re-verify with
.githooks/pre-commit+make dashboard-check+ the targeted Go tests, clear the stalestatus/review-failedlabel (the dispatched-suite rows are SKIPPED, not failed), and merge. No additional review needed — this is just the rebase.
If the rebase turns up anything ambiguous in the non-generated files, ping me and I'll dig in directly. And again — really nice work on this one, especially the boundary coverage around the wake grace. Sorry for the round-trip.
Review coverage:
- completed:
claude codex - unavailable:
qwen
6c75e41 to
f3de38b
Compare
| if resolved == nil || len(resolved.OptionsSchema) == 0 { | ||
| return nil, nil | ||
| } | ||
| mergedOptions := make(map[string]string, len(resolved.EffectiveDefaults)+len(optionOverrides)) |
Resolve conflict in generated dashboard index.ts by regenerating via make dashboard-check; openapi spec already carries the new permission-mode endpoint from the contributor's branch. Co-Authored-By: julianknutsen <julianknutsen@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Supersedes #1931.
Summary
POST /v0/city/{cityName}/session/{id}/permission-modeusing existing schema options /template_overridespersistence.permission_modedurable until changed again; no live process permission mutation system.permission_modeagainst the resolved provideroptions_schemabefore persisting./v0/session/{id}/permission-modeparity withX-GC-RequestandX-GC-Index.real_world_app_session_kind.Verification
.githooks/pre-commitpassed, including lint, generated docs/schema checks,go vet ./..., and observablego test ./....make dashboard-checkpassed.$review-prdual-model loop passed with zero blockers and zero majors in both Claude and Codex lanes after fixes.