Status: v0.2 ACCEPTED (2026-07-06) — Arch-authored; CXO + HOST trust-lens both PASS and folded (OQ-3 fully resolved); cut ACCEPTED per HOST ratification + CXO sign-off. (v0.1 was DRAFT-for-trust-lens.) Grounded in #1366 (PM-caught 2026-07-06: PIPER.user.md is a single unscoped instance-level file that leaks PM’s personalization + GitHub default-repo to every user on the shared alpha.pipermorgan.ai instance). Component A (github default-repo scoping) shipped earlier this session (Lead, f04cbeea6/1784ae017). Component B (system-prompt personalization) — IMPLEMENTED, BUILD-ratified, live-verified, and CLOSED (Lead, #1373, closed 2026-07-07): owner_id-scoped store (personalization_contexts, migration d075persctx), principal resolution wired into every confirmed request-path caller, seeded neutral-default persona + one-time first-response notice per CXO’s OQ-3 spec, D5 enforcement guard. Arch’s BUILD ratification (2026-07-07): clean against D1-D5 + OQ-1/2/3, and structurally “impossible-by-construction” for the #1366 leak — the FK-constrained, always-scoped repository methods mean an unscoped read/write can’t be expressed, not merely that it’s avoided. Live-verified 2026-07-07 against a real local Postgres (direct-service verification, not mocked): distinct-principal scoping, lazy-seeding, and the one-time notice all confirmed against real DB rows. OQ-1 (dedicated store, not personality_profiles) and OQ-2 (default_labels stays with ConnectorConfigService, not a new store) both decided at build time as the ADR reserved. Component C (#1260 mechanism repoint) deferred as a smaller follow-up per D6 — the only open item, tracked separately. Completes the server-owned-state family: ADR-070 (per-user connector bindings), ADR-071 (per-user content stores), ADR-075 (per-user config/personalization) — all three now ratified AND implemented.
Date: 2026-07-06
Author: Chief Architect
Deciders: Architect (author); PM (caught the gap; direction); Lead Dev (Component A implementation + two call-site corrections to the original ruling); PPM (Beta-Blockers scope); CXO + HOST (trust-lens — pending)
Supersedes / superseded by: none
Related: ADR-066 D7 (Configuration Ownership Convention — server-owned + per-request host augmentation; orthogonal axis — see D0), ADR-071 (User-Auth Anchoring for content stores — the direct pattern-parent: owner_id + is_global_pm_domain), ADR-070 (MCP-Consumer Connector Architecture — where the github default-repo binding lives, ConnectorConfigService), ADR-058 (user-scoped credentials — the original make-impossible precedent), methodology-40 (layer-then-migrate), methodology-41 (mechanism-displaces-unreferenced-discipline)
Grounding substrate: this session’s #1366 ruling (decisions.log 2026-07-06 ~06:45) + Lead’s Component-A completion memo (call-site corrections folded into D1)
PIPER.user.md is a single file at a fixed path (config/PIPER.user.md, fallback config/PIPER.md), read by a module-level global singleton (services/configuration/piper_config_loader.py::piper_config_loader). Every reader — get_system_prompt(), get_user_context(), load_github_config(), load_standup_config(), load_pm_identity_config() — takes zero user-scoping parameters. This was correct for a single-user local prototype (one person, one machine, one file). It is wrong on a shared multi-user server instance, and alpha.pipermorgan.ai is exactly that: one process, multiple external testers (onboarded via #1344), all reading the same file. Every tester’s Piper is primed with PM’s personal system-prompt context, and (before Component A) PM’s GitHub default-repo.
The same datum-scoping question recurs across every field the loader exposes, and the right answer differs by field. Blanket “scope everything by user” would be wrong (it would force per-user plumbing onto config that is legitimately install-wide). The decision that has to be made once, centrally, is the taxonomy (which config is per-user, which is PM-domain-global, which is install-wide) plus the resolution + degradation invariants. That is ADR-shaped, not a patch.
This ADR is the third leg of the server-owned-state family and reuses its shape one layer up:
ConnectorConfigService.get_default_repo(owner_id) is where Component A’s fix landed).owner_id stamped-at-write + scoped-at-read + is_global_pm_domain for PM-domain content). This is the direct pattern-parent — ADR-075 extends D1–D5 of ADR-071 from content rows to configuration.ADR-066 D7 (“Configuration Ownership Convention”) and ADR-075 are both “configuration ownership,” but on orthogonal axes, and conflating them causes errors (the author did, briefly, mid-session):
ADR-075 sits on ADR-066 D7 (personalization config is server-owned, per D7) and adds the per-user-scoping axis D7 gestured at (“when #1185 lands, D7’s server-owned-config pattern naturally accommodates per-user key materialization”). No conflict; ADR-075 realizes the per-user extension for personalization.
The user-facing contract this protects: a user’s Piper must never surface another user’s — or PM’s — personal context, priorities, or targeting. The failure mode is not merely “odd personalization”; it is a privacy breach (PM’s standing priorities/portfolio exposed to a tester) and, before Component A, a data-integrity breach (a tester’s github action defaulting to PM’s real repo). The trust-lens question this ADR most needs answered: on a shared instance, when a user has no personalization record yet, what neutral default does their Piper present — and is “neutral default” itself surfaced transparently (trust-check) or silent? (Parallels ADR-072 D5’s transparency-when-gated.)
Instance configuration is not one kind of thing. Every field must be classified into exactly one of three categories, and the store/scoping follows the category:
| Category | What | Examples (verified this session) | Scoping |
|---|---|---|---|
| 1. Per-user personalization | Config whose correct value depends on who is asking | system-prompt context (name/role/tz/style/focus/portfolio/standing-priorities), default_repository/owner, default_labels, standup prefs |
owner_id-scoped (D2) |
| 2. PM-domain-global | PM-domain-authoritative content that is intentionally global-by-design | the ADR-071 D1 distinguished-owner content set | is_global_pm_domain (ADR-071 D1) |
| 3. Install-wide config | A property of the deployment/instance, correct regardless of user | PM-numbering format (pm_prefix/pm_start/pm_padding) |
Instance-level singleton — explicitly NOT per-user; NOT a leak |
Classification test: does the value’s correctness depend on who is asking (→1), is it PM-domain-authoritative for all (→2), or is it a property of the deployment regardless of user (→3)?
(Category 3 is a correction owed to Lead: the original #1366 ruling over-included pm_number_manager.py’s 8 load_github_config() sites as leak sites. Lead verified they read pm_prefix/pm_start/pm_padding, not repo fields — install-wide numbering format, category 3. Naming category 3 explicitly is the guard against over-scoping it.)
owner_id-scoped, server-owned (extends ADR-071 to config)Per-user personalization moves into an owner_id-scoped, server-owned store (ADR-066 D7 axis: behind the server, not the host file). Same three ADR-071 invariants, one layer up:
is_global_pm_domain carries the PM-vs-tester distinction (category 2).Which store: extend an existing user-scoped profile store (PersonalityProfileRepository / a profile table) vs. add a dedicated personalization store — Lead’s build-time call; this ADR fixes the shape (owner_id-scoped, server-owned, is_global_pm_domain-aware), not the table choice.
PIPER.user.md is retained as the sole-owner / local-dev default. Where there is exactly one owner (local dev, single-tenant install), the file is that owner’s config and nothing regresses (satisfies #1366 AC “no regression to the single-tenant/local-dev case”). On a shared/hosted instance the owner_id-scoped store is authoritative and the file is a fallback default only. Resolution order: owner_id-scoped store → (miss) → neutral default (D4); the PM-personal file is never the fallback for a non-PM principal on a shared instance.
Personalization resolves by the authenticated principal at the request boundary (ADR-071 D4). The load-bearing invariant — the actual Component-B leak closure: on a shared instance, a request with no scoped personalization record for its principal degrades to a NEUTRAL default, never to PM’s personal file. get_system_prompt() / get_user_context() and their request-path callers (conversational_floor._get_system_prompt, the classifiers) must resolve/accept a principal and must not silently serve PM’s context to another user. “Never silently serve another principal’s config” is the config-layer form of ADR-071 D3 + ADR-070 D5’s never-silently-empty.
A guard/lint asserts category-1 reads are principal-scoped on request paths — the make-drift-impossible family already used for Component A (TestGitHubDefaultRepoScopingEnforcement), #1283 (reachability), #1307 (exempt-list). It must:
default_repository/owner) — SHIPPED this session; the scoped home pre-existed (ConnectorConfigService, ADR-070), so it was a migration-completion + lint, not new design.default_labels) — the store build (D2) + boundary resolution (D4) + guard (D5). default_labels (Lead-flagged: read off the unscoped loader, no scoped home) is category-1 and rides here — unless build-time analysis shows it is install-wide, in which case it is category-3 and stays instance-level (decide at build; do not design a standalone store for it).resolve_pm_owner_id() / load_pm_identity_config()) — lower-risk (CLI ingestion, not the alpha web path). The concept is sound (ADR-071 D1 distinguished PM-owner is legitimate); repoint the mechanism from an unscoped file-read to the durable owner record when B’s store lands.Layer-then-migrate: the single-owner file-default generalizes to the owner_id-scoped record with no rework.
Category-3 config (PM-numbering format) must not be forced per-user. Over-scoping is its own defect — it adds owner_id plumbing to a datum with one correct value per instance, and it would make the D5 guard incoherent. The guard must treat category-3 as legitimately unscoped. If a category-3 datum ever should become per-user, that is a new classification decision, made explicitly, not by default.
PIPER.user.md file format.PersonalityProfileRepository / a profile table, or a dedicated personalization store? (Lead’s call at build.)
personalization_contexts). PersonalityProfileModel holds HOW Piper talks (warmth/confidence-style/action-orientation/technical-depth — tone traits); this is WHAT Piper knows about the user (system-prompt content) — different concerns, and the existing table’s user_id column is the deprecated string pattern (not ADR-071 D2’s canonical owner_id FK), so extending it would also require migrating that column. Cleaner to start the new store on the canonical pattern directly.default_labels per-user (category 1) or install-wide (category 3)? Decide at build from actual usage.
ConnectorConfigService/connector_configs (same home as default_repository), not a new personalization-content store. Flagged as a separate, smaller follow-up; not pulled into Component B’s build.default_labels classification) remain build-time (Lead’s call at Component B) — they do NOT gate ACCEPTED.6bb955919d, 10-16). A suppressed notice is not marked shown, so it still appears once, on the first eligible reply. The wording stays (“(Running with a default configuration — nothing here needs setting up first.)”, CXO 09-08). Mechanism: services/configuration/personalization_service.py (FIRST_RESPONSE_PERSONALIZATION_NOTICE, returned ~219); Lead’s build.The 2026-07-06 ~06:45 #1366 ruling entry already records the decomposition; this ADR is its formalization. A one-line pointer will be appended on ratification.