Repository navigation
A project may be empty (D17): create first, add repositories later - #92
Merged
Merged
Conversation
Brett hit the non-empty guard creating a project from the panel and ruled: "it is better if we allow a project to exist without a repo defined." Recorded as topic decision D17 and realized end to end: The register schema admits an empty repositories set (the original task-2.6 minItems rule reversed; repositories becomes optional on the project shape; the packaged empty-project negative converts to a positive example). The create-project engine guard and the route's non-empty 400 are dropped (an absent list defaults to empty), the CLI's --repo becomes optional, and the edit-project last-member floor goes with them — removing the last member leaves a project awaiting its next additions. The create panel marks members optional and its commission button no longer requires a candidate. Spec delta: the empty-project scenario replaces the emptying-refused scenario; the requirement text drops the floor clause. Tests: empty create accepted (engine + wire, panel enabled with zero boxes), last-member removal accepted, malformed-list still 400. Full suites 2755 passed / 0 failed with exit codes verified (not tail-masked); strict validation 53/53. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
There was a problem hiding this comment.
Pull request overview
Implements decision D17 to allow ideation-dashboard projects to exist with an empty repository set (create first, populate later), removing prior “non-empty repositories” guards across the contract, engine, wire route, CLI, and UI, and updating tests/specs/examples accordingly.
Changes:
- Contract:
project-registerschema no longer requiresrepositoriesand no longer enforcesminItems: 1. - Engine + wire + CLI: remove create-project non-empty guard, accept missing/empty repositories at the route, and drop
--reporequirement. - Edit-project: remove “last-member floor” so removing the last member is accepted; update tests/spec text/examples to match.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/ideation-dashboard/test_edit_project.py | Updates guard/refusal expectations and adds engine-level test for last-member removal being legal. |
| tests/ideation-dashboard/test_create_project.py | Updates create-project tests so empty repositories and absent repositories in wire body are accepted. |
| scripts/ideation_dashboard/web/views/repo-selector.js | UI create panel now allows commissioning with zero repositories selected and explains it’s optional. |
| scripts/ideation_dashboard/kickoff.py | Removes engine guard requiring at least one repository on create; removes last-member floor on edit. |
| scripts/ideation_dashboard/gate_routes.py | Route accepts missing repositories and only enforces list type (not non-empty). |
| scripts/ideation_dashboard/cli.py | Makes --repo optional for create-project. |
| openspec/changes/add-opendox-project-header/tasks.md | Records completion of D17 work across schema/engine/wire/UI. |
| openspec/changes/add-opendox-project-header/specs/ideation-dashboard/spec.md | Replaces “emptying refused” scenario with “empty project is legal” requirement/scenario. |
| ideation/staging/dashboard-project-scoping/dashboard-project-scoping.md | Adds D17 decision note documenting the empty-project ruling. |
| examples/ideation-dashboard/project-register-empty-project.example.yaml | Adds a positive example of a project with repositories: []. |
| examples/ideation-dashboard/negative/project-empty-project.yaml | Removes the negative “empty project” example (no longer invalid). |
| contracts/schemas/project-register.schema.yaml | Makes repositories optional and removes minItems: 1 constraint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
124
to
+134
| def test_wire_shapes_and_refusals(tmp_path): | ||
| _register_beside(tmp_path) | ||
| with _serving(tmp_path) as (host, port, root): | ||
| status, payload = _post(host, port, "/actions/gate/edit-project", {}) | ||
| assert status == 400 and "project_id" in payload["message"] | ||
| status, payload = _post(host, port, "/actions/gate/edit-project", | ||
| {"project_id": "core", "add": "not-a-list"}) | ||
| assert status == 400 and "list" in payload["message"] | ||
| status, payload = _post(host, port, "/actions/gate/edit-project", | ||
| {"project_id": "core", | ||
| "remove": ["repoA", "repoB"]}) | ||
| assert status == 409 and "no member repositories" in payload["message"] | ||
| {"project_id": "nope", "add": ["repoA"]}) | ||
| assert status == 409 and "no project 'nope'" in payload["message"] |
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.
Brett hit
create-project refused: … non-empty repositories listcreating a project from the panel, and ruled: "it is better if we allow a project to exist without a repo defined" — create first, populate later viaedit-project. Recorded as topic decision D17, realized end to end:repositoriesis legal (the task-2.6minItems: 1reversed; the field becomes optional); the packaged empty-project negative example converts to a positive one.--repo's required flag are dropped; theedit-projectlast-member floor goes too — removing the last member leaves a project awaiting its next additions.Evidence: empty create accepted engine + wire + panel; last-member removal accepted; malformed lists still 400; full suites 2755 passed / 0 failed with exit codes verified (not tail-masked); strict validation 53/53.
🤖 Generated with Claude Code