Skip to content

Multi-parent project membership: a repo may live in many projects (dashboard-project-scoping D8) - #75

Merged
brettheap merged 1 commit into
mainfrom
change/multi-project-membership
Aug 6, 2026
Merged

brettheap merged 1 commit into
mainfrom
change/multi-project-membership

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Brett's 2026-08-06 realization-day ruling on add-project-scoped-selection ("we want a repo to be able to live in multiple projects"), recorded as design D-d / topic decision D8 — the D22 post-ratification-ruling precedent — and realized in the same pass.

The rule change

  • Repository → project membership is MULTI-PARENT: a project is a named view over repositories, not an owner. Project → group stays single-parent.
  • The snapshot keeps compatibility: singular project survives as the PRIMARY (first-declaring project in register order — deterministic, one heading per repository in grouped roll-ups) and an additive projects list carries full membership.

What changed

  • Register schema prose rules + snapshot schema (projects additive field); the register validator drops project-multi-parent-repo (group rule intact); the packaged negative example converts to a positive multi-parent example.
  • ProjectRegisterAdapter.projects_of(); generator stamps projects; the create-project single-parent guard dropped (roster guard unchanged); the create affordance offers all roster repos.
  • Change packet amended: MODIFIED "Project grouping hierarchy" requirement (with the new "A repository lives in several projects" scenario), the commission requirement's single-parent scenario becomes an acceptance, design D-d, tasks section 5.
  • First beneficiary landed in the aggregation repo (01ace7e): MedxFactory now lives in both domains (primary) and medx-clinical.

Evidence

Full dashboard suites 2600 passed / 0 failed; openspec validate --all --strict 52/52; delegated contract validator green.

🤖 Generated with Claude Code

…ts (D8)

Brett's 2026-08-06 realization-day ruling on add-project-scoped-selection
(design D-d; topic decision D8, the D22 post-ratification precedent):
a project is a named VIEW over repositories, not an owner.

Contracts: the register schema's validator-side rules rewritten —
repository->project membership is multi-parent, project->group stays
single-parent; the snapshot schema gains the additive `projects` list
(full membership in register order) beside the singular `project`,
which survives as the first-declaring PRIMARY so grouped roll-ups keep
one heading per repository. The register validator drops its
project-multi-parent-repo error; the packaged negative example converts
to a positive multi-parent example. The change's delta gains the
MODIFIED "Project grouping hierarchy" requirement and the create-project
requirement's single-parent scenario becomes a second-membership
acceptance.

Runtime: ProjectRegisterAdapter.projects_of() (primary first); the
generator stamps `projects`; the create-project single-parent guard is
dropped (roster guard unchanged); the affordance offers all roster
repositories as candidates.

Tests: owned-member acceptance engine + wire, adapter primary/full-list
resolution, shared-membership validity; full dashboard suites 2600
passed / 0 failed; openspec --all --strict 52/52. The D8 register
content (MedxFactory joins medx-clinical, staying primary in domains)
landed in the aggregation repo as 01ace7e; tasks section 5 records the
realization.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 6, 2026 14:06
@brettheap
brettheap merged commit 3de2697 into main Aug 6, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the ideation-dashboard “project scoping” model so a repository can belong to multiple projects (multi-parent), while preserving the existing singular project field in snapshots as a deterministic PRIMARY and adding an additive projects list for full membership. It updates contracts/specs, validator behavior, generator output, create-project behavior, UI affordances, and tests to reflect the D8 ruling.

Changes:

  • Extend snapshot projection to include additive projects while keeping project as PRIMARY (first-declaring in register order).
  • Remove validator + create-project enforcement of repo single-parent membership; keep project→group single-parent.
  • Update UI candidate selection + tests + OpenSpec docs/examples to encode and exercise multi-parent membership.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/ideation-dashboard/test_register.py Adds coverage for PRIMARY vs full membership resolution (resolve vs projects_of).
tests/ideation-dashboard/test_create_project.py Updates engine/wire tests to accept multi-parent repo membership and adjusts refusal scenario to id-collision.
scripts/validate-ideation-dashboard-contracts.py Drops repo multi-parent error check; keeps project→group single-parent validation.
scripts/ideation_dashboard/web/views/repo-selector.js Allows commissioning a project from any roster repo (no longer excludes “already-owned” repos).
scripts/ideation_dashboard/register.py Adds projects_of() and updates semantics docs around PRIMARY vs full membership.
scripts/ideation_dashboard/kickoff.py Removes create-project single-parent guard; keeps roster/register reachability validation.
scripts/ideation_dashboard/generator.py Stamps additive projects field into snapshots based on register membership.
scripts/ideation_dashboard/cli.py Updates CLI help text to reflect multi-parent membership.
openspec/changes/add-project-scoped-selection/tasks.md Records the D8 multi-parent membership work as completed tasks.
openspec/changes/add-project-scoped-selection/specs/ideation-dashboard/spec.md Updates grouping requirement + scenario to specify PRIMARY project + additive projects.
openspec/changes/add-project-scoped-selection/proposal.md Updates proposal to document the D8 rule change and implementation impact.
openspec/changes/add-project-scoped-selection/design.md Adds D-d design decision documenting multi-parent membership semantics.
ideation/staging/INDEX.md Updates staging index narrative to include D8 and realization status.
ideation/staging/dashboard-project-scoping/dashboard-project-scoping.md Updates staged doc to record D8 ruling and its consequences.
examples/ideation-dashboard/project-register-multi-parent.example.yaml Adds a positive example showing a repo in two projects.
examples/ideation-dashboard/negative/project-multi-parent-repo.yaml Removes the prior negative example since multi-parent is now valid.
contracts/schemas/project-register.schema.yaml Updates schema prose to define repo multi-parent membership and PRIMARY semantics.
contracts/schemas/ideation-dashboard-snapshot.schema.yaml Adds projects field to snapshot schema with PRIMARY relationship to project.
Suppressed comments (1)

scripts/ideation_dashboard/register.py:168

  • projects_of() currently returns project["id"] whenever id is merely non-None, without type/emptiness checks or repository-id normalization. If the register contains non-string ids or non-string repository entries (YAML can parse numbers), this can produce a snapshot projects list that violates the snapshot schema (items: string) or fails to match lookups consistently. Recommend filtering to non-empty string ids and comparing against str()-normalized repositories.
        return [project["id"] for project in self.projects()
                if project.get("id") is not None
                and repository in (project.get("repositories") or [])]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 155 to 159
@@ -156,6 +159,14 @@ def _repo_to_project(self) -> dict[str, str]:
out.setdefault(repo, pid)
@brettheap
brettheap deleted the change/multi-project-membership branch August 21, 2026 23:57
brettheap added a commit that referenced this pull request Oct 5, 2026
…h T095's acceptance job; tick T096 (plan 034) (#1241)

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Authored by lane openXfactory-3, delegated by lane openxfactory-4 (#656 5987202449)

**Plan 034 T096: AT-R1's browser half on the host, at `RELEASE1_TIP`, with the HTTP half beside it and T095's `acceptance` job.**

- X, `RELEASE1_TIP`, is openDox-code `389e5a4a22e1778653dac9f17172de2c18f9f808`, T095's landing (openDox-code#75).
- P, T087's pin, is `dede32b4b6f3d0f147d599776f83628c5af8ff3d`.
- T096's falsifier is *"the oracle's verdict, which must pass: zero `pageerror`, and nothing undeclared"*. Its record is *"this run's oracle verdict, and the URL and verdict of T095's `acceptance` job at the same openDox-code commit"*, with X's full sha and P beside it.

Housekeeping:

- This PR is bookkeeping, so it carries no `Arc:` trailer (R1Q20 (a), `5817152735`; T091). Claim: #656 comment `5987202449` (slice D6, delegated by lane openxfactory-4).
- **The form is T083's (#1231):** an evidence record in `evidence/`, the task ticked with a `Landed` bullet, plan.md's evidence inventory, and the feature's README entry linking the record.
- **Based on `main` `a43845e6`**, which holds T089's landing (#1238 → `fab575ad`). T089 landed first, on the holder's ruling `5987619278` (Q3). Commits: `f632d70c` (the record and the tick), then review rounds 1 to 4 (`95271efd`, `1df862ac`, `6f0f5381`, `318d99c2`), and `5c663a7e`, a merge of `main` `f2acc88c` (Q-GRC-4 bookkeeping, #1240, which touches no file of this PR). If `main` moves, I merge it in, with no rebase and no force-push.

**No Rule 6 window.** This PR touches nothing under `openspec/changes/`.

## Verdict

| # | the run | where | result, quoted |
|---|---|---|---|
| 1 | AT-R1's browser half, (a) `plain-documents` and (b) three notes with no front matter | openDox-code X `389e5a4a`, a fresh clone, quickstart.md § 1's install under the commit's lock, Playwright 1.61.0 with Chromium 149.0.7827.55 | **PASS**, `AT-R1 browser half at 389e5a4a…: PASS ((a) PASS; (b) PASS)` |
| 2 | AT-R1's HTTP half, T095's harness on the host | the same commit, its own fresh clone and venv | **PASS**, `314 assertions held` |
| 3 | T095's `acceptance` job: a `workflow_dispatch` of `validate.yml` on `main` while `main` was X (`5987619278`, Q1) | [run 37333323932](https://github.com/opensoft/openDox-code/actions/runs/37333323932), `head_sha` `389e5a4a22e1778653dac9f17172de2c18f9f808` (= X), [job 111841708700](https://github.com/opensoft/openDox-code/actions/runs/37333323932/job/111841708700) | **success**, *"AT-R1 HTTP half: PASS (314 assertions held)"* |
| 4 | T099's P-against-X step | `git diff --quiet dede32b4 389e5a4a -- src/ pyproject.toml migrations/ README.md LICENSE` | exit **0**, so X's runs stand for P: nothing ran at P, and no temporary branch was made. Lane openxfactory-4's own run of the step (15:29:25Z) also exited 0. |

The dispatch's gate read `main` as X at 15:30:06Z (`gh api repos/opensoft/openDox-code/commits/main`), and the dispatch followed at 15:30:07Z. The `acceptance` job fetched `+389e5a4a…:refs/remotes/origin/main` and checked out `main`. The run's other job, `validate` (the whole suite), is not part of T096's record.

T096's list, item by item (both repositories unless named):

- **The wheel** renders a tile for every station the snapshot fills: (a) 8 / 2 / 1 / 1 / 1 / 1; (b) 3 / 2, plus 2 derived "Candidate:" tiles.
- **The lens** renders the radar with the documents as dots, 8 of 8 and 3 of 3, with no "nothing on the radar", and offers neither seed action (R1Q19 (a)).
- **The workbench** opens from a grouping tile's `workbench` verb. Before any turn, its chat rail shows *"No model configured. To configure one, declare a model binding with "opendox model-binding add" …"*.
- **A turn** is refused `model_capability_unavailable` (HTTP 403), and the rail withholds Send, naming why.
- **The editors:** both open and accept edits. Create is refused by name: no create control is offered, and the plane note names creating a document and Save. Save is refused by name with `GATELESS_SAVE_REFUSAL`, and nothing is written.
- **The oracle:** zero `pageerror`, nothing undeclared, and no 5xx. Each of the three declarations is satisfied exactly: `/views/intent-feed.js`, `/snapshot-index.json` and `/project-register.json`, *"4 observed / 4 declared across 3 declaration(s)"*.

## What this PR records, in plan 034 only

- **`evidence/at-r1/`** (new):
  - `oracle-verdict.md`, the record;
  - `run-at-r1.sh` and `at_r1_browser.py`, the runbook and the driver, each as run but for its review fixes (three in the runbook, one in the driver). The record names the as-run sha256 of each, which this PR's first commit holds, beside the current one;
  - `x/`, the run at X. It holds the verdict lines, the commit and the install, `acceptance-job.txt`, the HTTP half's log and the resolved dependency set. For each repository it also holds the driver's log (the oracle's printed verdict), every check with its evidence, and the screenshots of steps 1–4;
  - `SHA256SUMS`, covering every file of the run.

  Every host path in the run's files is replaced by a placeholder, so no committed file names a host path (Principle IV). Byte-identical screenshots are stored once, and `screenshots.txt` maps every screenshot name to its stored file. No file holds the console token's value: each pass scans its own record for it.
- **`tasks.md`**: T096 is ticked, with a `**Landed**` bullet. 86 of 96 boxes are ticked on `main`, and 87 here.
- **`plan.md`**: the evidence tree lists `at-r1/`, and the paragraph under it names T096.
- **`README.md`**: the feature entry's evidence list links the record, after T089's.

## Ruled before this PR (the holder, `5987619278`)

1. **Q1, T095's job "at X".** It is a `workflow_dispatch` of `validate.yml` on `main` while `main` was X. The run's URL, its `head_sha` (equal to X) and the `acceptance` verdict are recorded. #75's last PR run does not stand in.
2. **Q2, "a refusal declared to the oracle".** The record carries a non-normative note: the create and Save refusals are refused by name, with no browser signal. Save's click sends no request, and create offers no control, so nothing is undeclared. spec.md and the plan are not reworded, and T097 lists the note with research R16's corrections.
3. **Q3.** T089 lands first, and this PR is based on `main` after it.

Two observations, unchanged since t096-dry, move no verdict. In (b), the wheel adds 2 derived "Candidate:" tiles while the candidate station is unfilled. Save's refusal note reads "Outline: Save refused" even when another buffer is active.

## Review round 1 (Copilot at `f632d70c`): one finding, accepted and fixed in `95271efd`

- r4185918186 (High): `run-at-r1.sh` documented "a full or short sha, or a ref", but required the checked-out sha to start with the argument, so `run-at-r1.sh main` was refused after a good checkout.
  - The fix: the argument is resolved with `git rev-parse --verify "<arg>^{commit}"`, the checkout must land on that commit, and only an abbreviated sha keeps the prefix check.
  - The test, from a fresh clone: `main`, `389e5a4a` and the full sha all check out, and `nosuchref` is refused by name. The as-run file reproduces the finding.
  - T096's run passed X's full sha, so no recorded step changes. Answered and resolved.

## Review round 2 (Copilot at `95271efd`): Findings None; two previously-missed items

- **The runbook named a host-absolute path:** the GNU grep it called, against the constitution's Principle IV, which says "use repo-relative paths or runtime resolution". A comment also spelled the process table's path. Fixed in `1df862ac`.
  - GNU grep is now the first `grep` on the PATH that reports itself as GNU grep.
  - The comment now says what it means without the path.
  - The browser half, run again at X with that file, gives the same check results.
  - The absolute paths that remain are the `env` shebang, the null device, and two libpq socket locations in the harness's own log, quoted verbatim as its assertion ids. None of them is a path of this host.
- **T095's box is still open while T096 is ticked.** T095 is lane openxfactory-4's task, and its tick is that lane's bookkeeping, as #1235 ticked T076, T086, T087, T101 and T104. This PR is delegated for T096 only and leaves T095's box alone.

## Review round 3 (Copilot at `1df862ac`): one finding, accepted and fixed in `6f0f5381`

- r4186065384: where the commit supplies its own harness, the runbook recorded the checkout's status after the harness but never refused a modified one.
  - It now stops when that status is not empty.
  - The run's `x/tree-after-harness.txt` is empty, and the HTTP half, run again at X, passes with `314 assertions held`.
  - Answered and resolved.

## Review round 4 (Copilot at `6f0f5381`): Findings None; one previously-missed item, fixed in `318d99c2`

- The editors check computed whether the Outline buffer was typed into, but never required it. It now requires the Outline editor as well as a document editor.
- The run's recorded results meet the stricter check (`outline_typed` is true in both repositories), and the browser half, run again at X with that driver, passes 18 of 18 checks in both.

## Review round 5 (Copilot at `5c663a7e`): two findings, answered and resolved with no push

Neither finding touches the record's correctness, so this head stays as it is.

- r4186202361 (Medium): `git diff --quiet` exits above 1 on an error, and the runbook records that status rather than refusing it.
  - In T096's run, both commits were present and the step exited 0 (`x/commit.txt`).
  - The wrapper that made the run checks both commits before the diff. It treats any non-zero status, an error included, as "build inputs differ", which re-runs both halves at P.
  - Answered (4186321172) and resolved.
- r4186202500 (Low): the runbook leaves its scratch directory.
  - `OUT` defaults to a directory inside it, so removing it would remove the record.
  - The teardown the record asserts is R1Q16 (iv)'s, not the scratch directory's removal.
  - Answered (4186321635) and resolved.
- The review's overview also says this PR "commits unsanitized host paths", with no finding behind it. A scan of every added text line at this head finds no host path. The only system-rooted paths are the four that round 2 names: the `env` shebang, the null device, and the two libpq socket locations.

## Validation, at this head (`5c663a7e`) against `main` `f2acc88c`

- **`python3 scripts/validate-openspec-cli-pin.py --all --strict`** (pinned CLI 1.12.0): rc 0, `Totals: 110 passed, 1 failed (111 items)`, `0 UNDISPOSITIONED failures`. The one failure is the accepted `add-chain-attestation` exception, as on `main`.
- **doc-health `--single-repo . --as-of 2026-10-05`**, in one clone named `openxFactory`, at `main` `f2acc88c` and at this branch, and at each earlier head against `main` `a43845e6`: **delta zero**. Both read `31 critical, 22 error, 69 warning, 20 info`, and the report bodies are byte-identical.
- **Tests that read plan 034's files:** none. `git grep -nE 'specs/034|opendox-standalone-operation' -- tests scripts .github` finds nothing, and this PR touches no code.
- **Shas:** every sha the diff cites resolves, 18 of 18: 16 in openDox-code, and 2 (`504324de`, `e1e3a3c3`) in opensoft/openDox.
- **Scans:** a scan of the commit message and this body finds no closing keyword and no `Arc:` line, and a scan of the diff finds no host path and no token value.
- **The required checks** at this head, read from its check-runs: all eight succeed.
- **SonarCloud** (not a required check): its quality gate fails on new code, at Reliability D and Security C. Its 41 issues are on the runbook and the driver:
  - 36 are shell style ("use `[[`").
  - 3 are "path traversal via CLI arguments", on the driver's own file arguments, which the runbook supplies.
  - 1 is an `assert` inside a `try` whose handler exits 2 with no verdict. The runbook records that as "the driver reached no verdict", so a failed assertion can never pass.
  - 1 is `STEP[0]`, a step label, written twice in a row.
  - None changes a recorded result, so the two files stay as run but for their review fixes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants