Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughParent sessions now resolve and freeze inherited profiles at startup. Agent launches, Status, and Usage use the session profile resolution. The changes also add follow mode, drift notices, routing rules for foreign repositories, tests, and documentation. ChangesSession profile resolution and routing
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Parent as Parent session
participant Startup as session_start
participant Resolver as resolveSessionProfile
participant Request as buildRequest
participant Routing as sessionProfileRoutingAt
Startup->>Resolver: freeze inherited profile
Request->>Resolver: resolve profile for writer admission
Request->>Routing: select routing for target
Routing-->>Request: target model profiles
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue remains from this review; the change is mergeable after normal checks. Pre-merge checks |
|
danielgap
left a comment
There was a problem hiding this comment.
Approve, with two non-blocking observations. Verified locally: 473/473 across gentle-agents.test.ts and gentle-shell.test.ts, which includes the #1558 invariants (admission/launch parity, queue freeze); the composition preserves them: the seam still resolves once per task request, before admission, now through resolveSessionProfile. #1824's files (the gentle-ai.ts panel and its tests) are untouched by this chain, so the overlap is the docs file only.
- The branches stack, so GitHub shows cumulative diffs (689 and 1073 lines) while the per-slice increments are 314 and 315. Consider noting the true increment in each PR body so the review load is visible.
- The #1558 native-review advisory (the explicit-binding branch of the usage path in
activeRoutingModels) is now covered for the frozen profile by the new status+Usage test, but the explicit-binding usage branch remains incidental. A small follow-up test fits either here or with 3b-i's coverage plans; happy to take it.
|
Thanks @danielgap for checking all three slices locally, and for going straight at the foreign-repository semantics.
|
|
Thanks @matraket, putting each slice’s own size and review commits at the top makes the chain much easier to review. Agreed on the coverage distinction: the profile-switch test exercises the explicit-binding branch incidentally, while #1837 provides the direct assertion. That addresses the two non-blocking observations from my review; my approval stands. |
…ession profile Part 3 of 3 of gentle-shell#1064 slice 3b-ii. Subagent launches, non-git writer admission, the footer profile label and the Usage provider scope resolve the session profile through resolveSessionProfile. The parent session_start freezes p -> P -> G; each launch from a frozen session shows one drift notice per distinct change of its own directory's defaults. Unpinned sessions now route through the profiles.json active profile instead of the materialized stores. Test fixtures pin GENTLE_PI_CONFIG_HOME to the scratch config home, reset the freeze between tests, write the writer-admission declaration before session_start, run the status polling test in follow mode, and switch the Usage profile through an explicit binding.
Describe the single precedence rule, the startup freeze, the behavior change for unpinned sessions, the drift notice, GENTLE_PI_PROFILE_FOLLOW=1, foreign repositories, children, and the in-memory limits until slice 3b-i persists the freeze.
97a5244 to
9c3fdb7
Compare
Summary
Part of #1064, slice 3b-ii. Wires the frozen session profile into every consumer that slice 2 (#1557/#1558) covered, through the single resolver from PR 1, and documents it.
extensions/gentle-agents.ts) resolve the session profile once per request throughresolveSessionProfile, so admission and launch cannot disagree (the feat(profiles): resolve the session binding in launches, status, and usage (#1064 2/2) #1558 "Writer effective profile or session changed during preparation" class).session_startofgentle-agents, for every reason Pi reports (startupalso covers--resume/--continue/--session). Idempotent per session id, so/reloadkeeps it.extensions/gentle-shell.ts) use the same rule and keep the existing labels; no new UI and no "frozen" wording.docs/readme-reference.md, plus the Usage scope wording indocs/gentle-shell.md.This is PR 3 of 4.
followis opt-in through the environment variableGENTLE_PI_PROFILE_FOLLOW=1only. There is no Pi flag yet: flags are registered per extension, so it was deferred (the earlier "flag or env" wording in #1826 referred to the plan).Issue
Part of #1064
PR type
type:feature)Changes
c6a48a2agentle-agents; status reader and Usage ingentle-shell; their tests.9c3fdb7eExisting tests whose expectations changed, each by design:
gentle-agentsfixtures pinGENTLE_PI_CONFIG_HOMEto the scratch config home; otherwise the new global layer read the developer's ownprofiles.json.session_start, since a declaration added after start no longer applies to the open session.GENTLE_PI_PROFILE_FOLLOW=1to keep exercising live refresh.Test plan
Rebased on
main(833054d9) after #1825 and #1826 merged; the only conflict was the Usage paragraph indocs/gentle-shell.md, resolved by keeping main's Codex-window text and this PR's scope wording. Re-verified after the rebase:provider-contractandruntime-harnesspass.session-profile-freeze,gentle-agents,gentle-shell,session-profile-binding,profile-pin,gentle-ai): 692 pass, 0 fail.active; no profile anywhere keeps today's routing after a pin appears; explicit binding wins without notice; follow re-resolves and Enter makes it explicit. New shell tests: status and Usage keep the frozen profile after the defaults change; follow shows the live default. Both shell tests fail against the previousgentle-shell.ts.check-types: no regressions.--resume,/reloador/newrun, and extension load order in a live process.Review follow-ups (non-blocking, from the native review)
repository_rootlaunch from a frozen session. Added in chore(profiles): review follow-ups for the frozen session profile (#1064 3b-ii 4/4) #2007, together with the cheap seam test @barbatdev suggested on feat(profiles): add follow mode, the drift notice and per-target routing (#1064 3b-ii 2/3) #1826.:1469-1478).cwdis undefined (extensions/gentle-shell.ts:204); not reachable today, sincebindalways setscwdandresetunbinds.gentle-agents'session_start(correct, but order-dependent); a failed startup freeze is swallowed and retried lazily on the next launch.Known limitations
/gentle:profiles"Current routing (effective)" table still reads the explicit binding or the materialized routing (extensions/gentle-ai.ts:4841,4857). It is a slice 3c consumer, so it can differ from launches until then.??while launch uses||; onlyGENTLE_PI_CONFIG_HOME=""is affected. Pre-existing; PRD PR 1 unifies it.readReviewerModelConfig,extensions/gentle-ai.ts:2203, from fix(profiles): apply orchestrator and reviewer routing per session #1886) reads the explicit binding, then the pin, thenmodels.json, so reviewers do not see the frozen profile yet. Another slice 3c consumer.Chain Context
followmain(each PR is opened againstmain; until its predecessors merge, its diff also shows their commits, and I rebase it as they land)Review only the commits listed under Changes.
Summary by CodeRabbit
followmode, default changes are reflected on the next refresh.