Repository navigation
feat(staged): let sessions create any number of projects - #1126
Merged
Merged
Conversation
A session and the sessions in its chain could hold at most 10 projects created through `stagedctl project create`. The count had no decay, so a long-lived orchestrating session was refused for good once 10 of its chain's projects existed, until the user deleted some. Remove the cap: - Drop `CREATED_PROJECT_LIMIT` and both `ensure_within_limit` checks (the early one in the control request builder and the locked one beside the insert), and delete the `creation_limit` module. - Drop the chain-depth guard (`SESSION_LINEAGE_MAX_DEPTH`), which only bounded the walk the count needed. - Remove what that leaves dead: `ProjectCreator::limit`, and the store's `session_lineage_root`, `session_actor_id`, `count_projects_by_creator` and `list_project_ids_created_by`. - `projects.created_by` is still recorded for every control-created project, as attribution. No migration. `stagedctl project create --help`, the pinned help fixture and the agent guide no longer describe a limit, and the tests that pinned the limit's wording now check it is gone. A new test creates 25 projects each as a session and as a connected app. Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…docs Review of the cap's removal found the control server's module doc still saying a class B grant "is free of the two rules that ask whether the actor is a session (`open_project`, and the limit on created projects)". The limit is gone, so only the `open_project` refusal remains. - `control_server.rs`: state the single rule, matching the "one decision" wording `grants.rs` already uses. - `control_server/enrol.rs`: the "Who may enrol" paragraph listed the same limit among what a session would shed by enrolling. The review did not flag it; a sweep for the phrase did. Reworded the same way. Comments only; no behaviour change. Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A session, and the sessions in its chain, could hold at most 10 projects created through
stagedctl project create. Nothing ever decayed that count. Once 10 of a chain's projects existed, a long-lived orchestrating session was refused for good until the user deleted some. This PR removes the cap.CREATED_PROJECT_LIMITand bothensure_within_limitchecks: the early one in the control request builder and the locked one beside the insert. Delete thecreation_limitmodule.SESSION_LINEAGE_MAX_DEPTH). It only bounded the lineage walk that the count needed.ProjectCreator::limit, plus the store'ssession_lineage_root,session_actor_id,count_projects_by_creatorandlist_project_ids_created_by.projects.created_byis still recorded for every project created through the control server, as attribution only. No migration and no schema change.stagedctl project create --help, the pinned help fixture and the agent guide (resources/stagedctl/guide.md) no longer describe a limit.A connected app approved for a single project still cannot create projects (exit 4,
scope_denied).Testing
staged-cihook passed.🤖 Generated with Claude Code