Skip to content

Shared-identity seeds: the DTN register's first candidate rule, computed - #105

Merged
brettheap merged 1 commit into
mainfrom
change/shared-identity-seeds
Aug 7, 2026
Merged

brettheap merged 1 commit into
mainfrom
change/shared-identity-seeds

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Brett: "yes, lets start that now" — the successor named at the close of the repository lens.

The gap this closes

The promotion process names four ways a DTN candidate is born, and the first has never been implemented:

Two or more domain repos use the same structure with different domain nouns.

The neutrality-drift lane's four stage-1 signals ask adjacent questions — near_duplicate compares a domain file against the openxFactory tree, cross_repo_consumer looks for references, lexicon_absence and uninventoried_tooling read one repository at a time. None asks whether two domain repositories carry the same thing. That rule has been served by manual search passes only.

The repository lens computes exactly it: ring 2 and inward IS the rule's population.

What ships

  • doc_health/shared_identity.py — the detector (identities carried by 2+ of a member set, optionally exactly a named carrier combination, i.e. a lens region) and a deterministic seed drafter emitting the register's own row + ### DTN-NNN: section, numbered past every id the register mentions, quoting the rule it satisfies and listing carriers as the evidence.
  • A loopback drafting route: recomputes carriers from the serve's own composed view — the client names the project, the visible set and the region, never the evidence — and returns TEXT.
  • The lens drill-in rows gain "draft DTN seed", enabled on convergent regions and disabled with its reason on single-carrier ones; the draft renders read-only with a copy control.

Seed-first, never a write — the neutrality lane's own discipline. The register is never opened for writing; a candidate enters the lifecycle only when a human merges the seed. That is precisely what makes the affordance legitimate on a composed read-only view: nothing is written, no gate capability is claimed, and D10 stands untouched. No schema, no gate verb, no contract growth.

What the live check caught

A row reading "1 doc" drafted a 4-artifact seed, because the region's carrier combination was not carried through to the detector. Fixed with an exact-combination rule and pinned by test — an affordance must not lie about what it drafts.

On the real corpus

Project domains yields docs/credentialing.md shared by LedgerxFactory ∧ OpsxFactory ∧ codexFactory, plus two documents in all five factories and one in two — findings the register had no automated path to.

Verification

Detector, drafter (row grammar, numbering, determinism, empty refusal) and wire tests including that the checkout is byte-for-byte unchanged after a call; live browser check on the 14-repository plane. Full suites 2777 passed + 642 doc-health, exit 0; openspec validate --all --strict green.

Open: 4.5 (Brett merges the first seed) and the named successor — promoting the detector to a fifth neutrality-drift stage-1 signal so the nightly lane files these unattended.

🤖 Generated with Claude Code

The promotion process names four ways a candidate is born and the FIRST —
'two or more domain repos use the same structure with different domain
nouns' — had no implementation. The neutrality lane's four stage-1
signals ask adjacent questions: near_duplicate compares a domain file
against openxFactory, cross_repo_consumer looks for references, and the
other two read one repository at a time. None asks whether two DOMAIN
repos carry the same thing.

The repository lens (D21) computes exactly that — ring 2 and inward IS
the rule's population — so this turns it into the register's own intake
artifact. doc_health/shared_identity.py detects identities carried by two
or more of a member set (optionally exactly a named carrier combination,
which is a lens region) and drafts a seed in the register's format: the
Candidate List row plus the ### DTN-NNN: section, numbered past every id
the register mentions, quoting the rule it satisfies and listing carriers
as evidence. Deterministic — the carrier set is a fact about the pinned
trees, so one corpus state drafts a byte-identical seed.

SEED-FIRST, NEVER A WRITE, the neutrality lane's own discipline: the
register is never opened for writing and a candidate enters the lifecycle
only when a human merges the seed. That is what makes the affordance
legitimate on a composed READ-ONLY view — nothing is written, so no gate
capability is claimed and D10 stands untouched. The serve recomputes the
carriers from its own composed view; the client names the project, the
visible set and the region, never the evidence.

The live check caught the one thing that mattered: a row reading '1 doc'
drafted a 4-artifact seed, because the region's combination was not
carried through. Fixed with an exact-combination rule and pinned by test
— an affordance must not lie about what it drafts.

On the real corpus this finds docs/credentialing.md in three factories.
Suites 2777 + 642 doc-health passed (exit 0); strict validation green.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 7, 2026 16:51
@brettheap
brettheap merged commit 82e3ec4 into main Aug 7, 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 implements the DTN register’s first “shared identity across 2+ domain repositories” candidate rule end-to-end in the ideation dashboard: detecting cross-repo shared document identities from the composed view, drafting a deterministic register seed (row + detail section) without writing anything, exposing it via a loopback-only server route, and adding a UI affordance to draft/copy the seed from convergent lens regions.

Changes:

  • Added doc_health.shared_identity detector + deterministic DTN seed drafter (register-format row + ### DTN-NNN: section).
  • Added loopback-only /actions/dtn-seed route on the dashboard server to recompute evidence from the composed view and return seed text.
  • Updated repository lens drill-in UI to enable “draft DTN seed” on convergent regions and render the draft read-only with copy support; added tests + OpenSpec artifacts.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/ideation-dashboard/test_shared_identity.py Adds detector/drafter/route wire tests and determinism/write-free guarantees.
scripts/ideation_dashboard/web/views/lens.js Adds DTN seed drafting UI affordance, request payload wiring, and seed rendering/copy.
scripts/ideation_dashboard/web/styles.css Styles the drafted seed as read-only document text (.seedtext).
scripts/ideation_dashboard/serve.py Adds loopback-only /actions/dtn-seed handler that drafts seeds from composed view.
scripts/doc_health/shared_identity.py New detector + seed drafter + register numbering logic for shared-identity rule.
openspec/changes/add-shared-identity-seeds/tasks.md Task checklist for detector/route/UI/tests and successor note.
openspec/changes/add-shared-identity-seeds/specs/ideation-dashboard/spec.md Requirements/spec delta for drafting seeds from convergent lens regions.
openspec/changes/add-shared-identity-seeds/proposal.md Proposal describing scope, rationale, and constraints (seed-first / no writes).
docs/domain-to-neutral-promotion-process.md Updates process doc to note the rule is now computed and draftable via the dashboard.
Suppressed comments (1)

tests/ideation-dashboard/test_shared_identity.py:141

  • Unused import: http.client is imported but never used in this test, which will fail linting in stricter configurations.
    import http.client

    from test_project_aggregates import _source

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

Comment on lines +16 to +17
import json
from pathlib import Path
Comment on lines +673 to +677
const label = button.textContent;
button.disabled = true;
button.textContent = "drafting…";
status.textContent = "";
try {
Comment on lines +186 to +190
f"{len(rows)} document "
+ ("identity is" if len(rows) == 1 else "identities are")
+ f" carried by {MINIMUM_CARRIERS} or more of the project's member "
f"repositories ({', '.join(repos)}). The carrier set is the evidence: "
"no model judged this, and a re-run over the same corpus state drafts "
Comment on lines +2156 to +2159
try:
register_text = register.read_text(encoding="utf-8")
except OSError:
register_text = "" # no register reachable: number from zero
@brettheap
brettheap deleted the change/shared-identity-seeds branch August 21, 2026 23:57
brettheap pushed a commit that referenced this pull request Aug 27, 2026
…archive

add-shared-identity-seeds declares a non-empty code surface, so the
realization archive gate keys on the surface rather than on
`target_release: none` — the same reading add-model-provider-broker's
archive recorded a day earlier, applied rather than re-litigated.

MERGED: the whole surface landed in ONE commit, 8a028c2 through PR #105
(main 82e3ec4, 2026-08-07), and both are ancestors of main 42662b7. All
five declared elements resolve at main and each of the eleven ticked boxes
was re-derived against them rather than trusted, because this packet has no
finisher pull request to cite: the detector and drafter signatures, the
REGISTER_PATH mirror and the test that pins it, the route's four refusals
and its read-only register access, the lens affordance and its read-only
panel, the seven tests, and DTN-025 present in the register at main — the
artifact PR #380 produced, verified in the register rather than in the
commit message.

GREEN, with the honest shape of it recorded: PR #105 carries ZERO check
runs, because pytest-suite.yml — this repository's only trigger that runs
pytest at all — first landed 2026-08-24, seventeen days later. So the claim
rests on main, where the gate has covered this code from the moment the gate
existed: every uncancelled green main run from the first (cbf2368, run
32802536347) to the last (42662b7, run 33062355435, success) carries the
detector, the route, the affordance and the test file at identical blobs,
and the workflow has no paths filter. That last run's head IS this branch's
base commit. In a fresh clone the surface's own tests pass 7/7, 32 passed
with one pre-existing lens-suite environment skip.

Promotion is ADDED-ONLY and no canon repair was owed: ideation-dashboard
99 -> 100 requirements, 453 -> 457 scenarios, with all 99 pre-existing
bodies sha256-hashed before and after and 99/99 byte-identical. Zero title
collisions against promoted canon. The block a careless reading would expect
to be MODIFIED — "Composed views are read-only with a repository jump" — is
correctly left alone: its rule binds gate-bearing affordances, and this one
writes nothing and claims no gate capability. All three active changes that
MODIFY an ideation-dashboard block commute with this archive.

5.1 STAYS UNTICKED, following add-roster-device-admission-surface's §6 and
refine-demote-round-trip-mechanics's §8: an unticked box means owned
elsewhere, and ticking it would claim work this change never did. The
successor is named rather than gestured at — a fifth entry in
neutrality.py's SIGNAL_NAMES, which still reads four names at 42662b7, so
it is measurably unbuilt.

.openspec.yaml MOVED rather than being deleted (blob afd0e60 either side),
so the known archive defect did not bite this run. openspec validate --all
--strict green at 75/75; doc-health --single-repo reports 61 findings
against a pristine clone of the same base commit's 61, zero new and zero
gone.

Co-Authored-By: Claude Fable 5 <[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