Backfill granularity.domain_scope across 158 catalog tools (5 blade catalogs) #35

Closed
opened 2026-07-02 07:29:59 +00:00 by piersdd · 4 comments
piersdd commented 2026-07-02 07:29:59 +00:00 (Migrated from github.com)

Migrated from the vault DEVFU register by the DD-422 sweep (frozen-index entry [232], DEVFU-2026-05-23-dd338-a2-dom-c-catalog-domain-scope-sweep).

Context (register entry, verbatim)

DEVFU-2026-05-23-dd338-a2-dom-c-catalog-domain-scope-sweep — Catalog-side granularity.domain_scope: declarations across 158 tools in stallari-plugins/plugins/tools/{gmail,home-assistant,mastodon,tailscale,syncthing}-blade-mcp.json (21+36+45+18+38). Optional at pack-spec v4.4.0 per CHANGELOG line 25 ("promotion to required-not-optional lands as F.4.b after the DD-338 A.2.dom blade backfill completes"). Fix shape: per-blade classification — multi for list-emitters returning user-domain-bearing records (gmail_search/snippets/thread/changes, ha_states/states_by_domain/history/devices/entities, mastodon timelines/search/notifications/account_statuses/conversations, ts_devices/users/audit_log, syncthing_list_folders/list_devices/replication_report); single for single-entity tools (gmail_read/send/reply/draft, ha_state/call_service, mastodon_status/account, ts_device/key, syncthing_folder_status); non-conforming-explicit derivation via non_conformance_rationale.domain_scope_unspecified for system-info tools that don't return user content (gmail_info/state, ha_info/config, mastodon_info/verify, ts_info, syncthing_system_status). After flips: npm run validate + node scripts/build-catalog.js + commit + PR + merge. Effort: ~30-45min architect-direct OR ~1h coding-subagent with classification rubric. Affects: assembler-side verdict logic (DD-338 Phase F.5) consuming domain_scope — currently has no machine-readable surface to read. Related: DD-338 A.2.dom.c shipped 2026-05-23; pack-spec v4.4.0 CHANGELOG line 19 + line 25; F.4.b activation trigger.

Acceptance criteria

  1. All 158 tools across the 5 catalogs (plugins/tools/{gmail,home-assistant,mastodon,tailscale,syncthing}-blade-mcp.json; 21+36+45+18+38) carry granularity.domain_scope, classified per the rubric in Context: multi for user-domain-bearing list-emitters, single for single-entity tools, non-conforming-explicit via non_conformance_rationale.domain_scope_unspecified for system-info tools returning no user content.
  2. Tools not covered by the rubric's named examples are classified with a one-line rationale in the PR description (no silent guesses).
  3. npm run validate green; node scripts/build-catalog.js rebuilds; the catalog diff contains only domain_scope (+rationale) additions.
  4. Follow-on noted on merge: this completes the DD-338 A.2.dom backfill precondition, activating pack-spec F.4.b (promote domain_scope optional → required at the next pack-spec major/minor per CHANGELOG line 25).

Blocked by

None - can start immediately


Acceptance criteria shaped by AI triage, 2026-07-16.

Migrated from the vault DEVFU register by the DD-422 sweep (frozen-index entry [232], DEVFU-2026-05-23-dd338-a2-dom-c-catalog-domain-scope-sweep). ## Context (register entry, verbatim) **DEVFU-2026-05-23-dd338-a2-dom-c-catalog-domain-scope-sweep** — Catalog-side `granularity.domain_scope:` declarations across 158 tools in `stallari-plugins/plugins/tools/{gmail,home-assistant,mastodon,tailscale,syncthing}-blade-mcp.json` (21+36+45+18+38). Optional at pack-spec v4.4.0 per CHANGELOG line 25 ("promotion to required-not-optional lands as F.4.b after the DD-338 A.2.dom blade backfill completes"). **Fix shape:** per-blade classification — `multi` for list-emitters returning user-domain-bearing records (gmail_search/snippets/thread/changes, ha_states/states_by_domain/history/devices/entities, mastodon timelines/search/notifications/account_statuses/conversations, ts_devices/users/audit_log, syncthing_list_folders/list_devices/replication_report); `single` for single-entity tools (gmail_read/send/reply/draft, ha_state/call_service, mastodon_status/account, ts_device/key, syncthing_folder_status); `non-conforming-explicit` derivation via `non_conformance_rationale.domain_scope_unspecified` for system-info tools that don't return user content (gmail_info/state, ha_info/config, mastodon_info/verify, ts_info, syncthing_system_status). After flips: `npm run validate` + `node scripts/build-catalog.js` + commit + PR + merge. **Effort:** ~30-45min architect-direct OR ~1h coding-subagent with classification rubric. **Affects:** assembler-side verdict logic (DD-338 Phase F.5) consuming `domain_scope` — currently has no machine-readable surface to read. **Related:** [[DD-338]] A.2.dom.c shipped 2026-05-23; pack-spec v4.4.0 CHANGELOG line 19 + line 25; F.4.b activation trigger. ## Acceptance criteria 1. All 158 tools across the 5 catalogs (`plugins/tools/{gmail,home-assistant,mastodon,tailscale,syncthing}-blade-mcp.json`; 21+36+45+18+38) carry `granularity.domain_scope`, classified per the rubric in Context: `multi` for user-domain-bearing list-emitters, `single` for single-entity tools, `non-conforming-explicit` via `non_conformance_rationale.domain_scope_unspecified` for system-info tools returning no user content. 2. Tools not covered by the rubric's named examples are classified with a one-line rationale in the PR description (no silent guesses). 3. `npm run validate` green; `node scripts/build-catalog.js` rebuilds; the catalog diff contains **only** `domain_scope` (+rationale) additions. 4. Follow-on noted on merge: this completes the DD-338 A.2.dom backfill precondition, activating pack-spec F.4.b (promote `domain_scope` optional → required at the next pack-spec major/minor per CHANGELOG line 25). ## Blocked by None - can start immediately --- > *Acceptance criteria shaped by AI triage, 2026-07-16.*
piersdd commented 2026-07-16 12:21:36 +00:00 (Migrated from github.com)

🛑 SVD architect gate: gh#35 backfill-granularity-domain-scope-across-158-catalog-tools-5

Status: NEEDS ARCHITECT JUDGEMENT after 2 rework round(s) · 1 blocking defect(s) · complexity substrate · dispatch effort high

Open risks:

  1. Runtime consumption remains outside this target-repo dispatch. After Groupthink-dev/stallari-harness#247 lands, generate the catalog, decode Home Assistant ha_call_service (single) and one Mastodon non-conforming-explicit row through CatalogResponse → PluginRegistry → ProvenanceJoin, and assert the F.5 verdict receives each enum unchanged. [verification]

Blocking defects (verbatim, with evidence):

  1. [INVARIANT/root-cause/open-risk audit against the live target tree] No evidence-backed verdict can be issued because the live-tree audit could not run. The spec was read, but accepting its Evidence Pack as proof would violate the requested adversarial method.
    Evidence: Every attempted read/grep process failed before execution with Too many open files (os error 24), including a minimal pwd/true. A subsequent request to run the read-only audit outside the sandbox was rejected. Therefore none of the spec’s invariant or root-cause claims could be independently confirmed or contradicted.

Change: Mirror enforceDomainScope() at scripts/build-catalog.js:167-237 and pluginToCatalogEntry() at :420-473. Add domain-only rationales for all 21 Gmail rows, 23 ambiguous Home Assistant rows, and all Mastodon/Tailscale/Syncthing rows; declare single only on the 13 Home Assistant handlers protected by _write_gate(instance). Project post-derivation tools[] into generated catalog entries.

Files: plugins/tools/gmail-blade-mcp.json · plugins/tools/home-assistant-blade-mcp.json · plugins/tools/mastodon-blade-mcp.json · plugins/tools/tailscale-blade-mcp.json · plugins/tools/syncthing-blade-mcp.json · schemas/catalog-entry.schema.json · scripts/build-catalog.js · scripts/catalog-entry.schema.test.js · scripts/domain-scope.test.js

Your call (when this issue is held by flow-drain via svd:hold):

  • add label svd:go — approve; the next tick dispatches exactly this spec (open risks accepted)
  • add label svd:skip — park it; the drain drops it and the issue stays for a human
  • add label svd:respec — discard this spec; the next tick re-runs Half-A fresh with this record as prior-attempt context

Spec: /Users/piers/master-ai/atlas/utilities/agent-harness/specs/2026-07-16-backfill-granularity-domain-scope-across-158-catalog-tools-5.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/master-ai/atlas/utilities/agent-harness/specs/2026-07-16-backfill-granularity-domain-scope-across-158-catalog-tools-5.md

### 🛑 SVD architect gate: gh#35 backfill-granularity-domain-scope-across-158-catalog-tools-5 **Status:** NEEDS ARCHITECT JUDGEMENT after 2 rework round(s) · 1 blocking defect(s) · complexity `substrate` · dispatch effort `high` **Open risks:** 1. Runtime consumption remains outside this target-repo dispatch. After Groupthink-dev/stallari-harness#247 lands, generate the catalog, decode Home Assistant ha_call_service (single) and one Mastodon non-conforming-explicit row through CatalogResponse → PluginRegistry → ProvenanceJoin, and assert the F.5 verdict receives each enum unchanged. [verification] **Blocking defects (verbatim, with evidence):** 1. [INVARIANT/root-cause/open-risk audit against the live target tree] No evidence-backed verdict can be issued because the live-tree audit could not run. The spec was read, but accepting its Evidence Pack as proof would violate the requested adversarial method. Evidence: Every attempted read/grep process failed before execution with `Too many open files (os error 24)`, including a minimal `pwd`/`true`. A subsequent request to run the read-only audit outside the sandbox was rejected. Therefore none of the spec’s invariant or root-cause claims could be independently confirmed or contradicted. **Change:** Mirror enforceDomainScope() at scripts/build-catalog.js:167-237 and pluginToCatalogEntry() at :420-473. Add domain-only rationales for all 21 Gmail rows, 23 ambiguous Home Assistant rows, and all Mastodon/Tailscale/Syncthing rows; declare single only on the 13 Home Assistant handlers protected by _write_gate(instance). Project post-derivation tools[] into generated catalog entries. **Files:** `plugins/tools/gmail-blade-mcp.json` · `plugins/tools/home-assistant-blade-mcp.json` · `plugins/tools/mastodon-blade-mcp.json` · `plugins/tools/tailscale-blade-mcp.json` · `plugins/tools/syncthing-blade-mcp.json` · `schemas/catalog-entry.schema.json` · `scripts/build-catalog.js` · `scripts/catalog-entry.schema.test.js` · `scripts/domain-scope.test.js` **Your call** (when this issue is held by flow-drain via `svd:hold`): - add label `svd:go` — approve; the next tick dispatches exactly this spec (open risks accepted) - add label `svd:skip` — park it; the drain drops it and the issue stays for a human - add label `svd:respec` — discard this spec; the next tick re-runs Half-A fresh with this record as prior-attempt context <sub>Spec: `/Users/piers/master-ai/atlas/utilities/agent-harness/specs/2026-07-16-backfill-granularity-domain-scope-across-158-catalog-tools-5.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/master-ai/atlas/utilities/agent-harness/specs/2026-07-16-backfill-granularity-domain-scope-across-158-catalog-tools-5.md`</sub>
piersdd commented 2026-07-16 20:28:41 +00:00 (Migrated from github.com)

spec-verify-dispatch Half B for gh#35 Backfill granularity.domain_scope across 158 catalog tools (5 blade catalogs) completed integration verify.

  • PR: https://github.com/Groupthink-dev/stallari-plugins/pull/38
  • Build: green
  • Test: green
  • Reader audit clean: True
  • Spec fidelity: True
  • Ready for merge: True
  • Checks: PR #38: Validate green; filtered tests 96/96; catalog generation green; nine specified files only; merge-ready.
  • Warning: Full npm test remains red only from pre-existing missing scripts/generated/declared-services.js imports in validate-packs tests; scoped tests passed 96/96.
  • Warning: Catalog build passed with the expected warning that optional canonical stallari-packs is absent.
  • Warning: stallari-harness currently drops domain_scope in GranularityDeclaration; this audited downstream F.5 gap is explicitly owned by stallari-harness#247.
spec-verify-dispatch Half B for gh#35 Backfill granularity.domain_scope across 158 catalog tools (5 blade catalogs) completed integration verify. - PR: https://github.com/Groupthink-dev/stallari-plugins/pull/38 - Build: green - Test: green - Reader audit clean: True - Spec fidelity: True - Ready for merge: True - Checks: PR #38: Validate green; filtered tests 96/96; catalog generation green; nine specified files only; merge-ready. - Warning: Full `npm test` remains red only from pre-existing missing `scripts/generated/declared-services.js` imports in validate-packs tests; scoped tests passed 96/96. - Warning: Catalog build passed with the expected warning that optional canonical stallari-packs is absent. - Warning: stallari-harness currently drops `domain_scope` in GranularityDeclaration; this audited downstream F.5 gap is explicitly owned by stallari-harness#247.
piersdd commented 2026-07-16 20:36:27 +00:00 (Migrated from github.com)

⏸ SVD architect gate: gh#35 Backfill granularity.domain_scope across 158 catalog tools (5 blade catalogs)

Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · complexity substrate · dispatch effort high

Held because: CLEAN but 2 open risk(s) (1 verification · 1 decision) — HOLD-ALL parks everything; sequencing-only risks with merged deps get REC-GO in the drain ping. The risks, verbatim:

Open risks:

  1. Runtime consumption of the fifth axis is outside this target-repo dispatch. Changed since the prior attempt: re-verified this session that Groupthink-dev/stallari-harness#247 is still OPEN/ready-for-agent with no movement, and the precise drop point is confirmed (GranularityDeclaration CodingKeys :92-95 omit domain_scope, so decode silently discards it). Exact post-#247 check: rebuild this catalog, decode ha_call_service (single) and one Mastodon derived non-conforming-explicit row through CatalogResponse → PluginRegistry → ProvenanceJoin, assert the F.5 verdict receives each enum unchanged. [verification]
  2. Contract docs vs live behavior on single: email-v1.md/home-v1.md granularity-attestation sections nominally prescribe domain_scope:"single" for their ops, and domain-scope.md's own single examples include ha_state(entity_id=…). This spec classifies from live blade behavior instead (Gmail's per-record user-domain pattern engine partitions within one mailbox; HA reads fan into all providers when instance omitted), yielding 13 single / 145 derived per the declare-worse rule. New since the prior attempt: this judgement was embedded but never surfaced, and the prior gate issued no content verdict (verify never ran). Question: confirm the conservative live-behavior classification, or direct alignment with the contract-doc attestations (which would flip Gmail's 21 and some/all HA reads to single)? Approving the spec as-is confirms the conservative reading. [decision]

Change: Retain enforceDomainScope() at scripts/build-catalog.js:190-242 as the sole 5th-axis derivation seam; branch non_conformance_rationale in schemas/catalog-entry.schema.json:154-198 (required:["reason"] + dependentRequired quartet-triangle + anyOf[affected_tools|domain_scope_unspecified] + minItems:1) so a domain-only rationale is expressible without falsely asserting scope_filtering_off; declare domain_scope:"single" on exactly the 13 HA handlers with live _write_gate(instance) call sites (ha server.py:906-1331), list the other 145 tools (21 Gmail + 23 HA + 45 Mastodon + 18 Tailscale + 38 Syncthing) in per-file domain_scope_unspecified for derived non-conforming-explicit (zero multi — no blad…
Files: plugins/tools/gmail-blade-mcp.json · plugins/tools/home-assistant-blade-mcp.json · plugins/tools/mastodon-blade-mcp.json · plugins/tools/tailscale-blade-mcp.json · plugins/tools/syncthing-blade-mcp.json · schemas/catalog-entry.schema.json · scripts/build-catalog.js · scripts/catalog-entry.schema.test.js · scripts/domain-scope.test.js

Your call (when this issue is held by flow-drain via svd:hold):

  • add label svd:go — approve; the next tick dispatches exactly this spec (open risks accepted)
  • add label svd:skip — park it; the drain drops it and the issue stays for a human
  • add label svd:respec — discard this spec; the next tick re-runs Half-A fresh with this record as prior-attempt context

Spec: /Users/piers/master-ai/atlas/utilities/agent-harness/specs/2026-07-17-backfill-granularity-domain-scope-across-158-catalog-tools.md — resume with approvedSpecPath set to it.

### ⏸ SVD architect gate: gh#35 Backfill granularity.domain_scope across 158 catalog tools (5 blade catalogs) **Status:** CLEAN after 0 rework round(s) · 0 blocking defect(s) · complexity `substrate` · dispatch effort `high` **Held because:** CLEAN but 2 open risk(s) (1 verification · 1 decision) — HOLD-ALL parks everything; sequencing-only risks with merged deps get REC-GO in the drain ping. The risks, verbatim: **Open risks:** 1. Runtime consumption of the fifth axis is outside this target-repo dispatch. Changed since the prior attempt: re-verified this session that Groupthink-dev/stallari-harness#247 is still OPEN/ready-for-agent with no movement, and the precise drop point is confirmed (GranularityDeclaration CodingKeys :92-95 omit domain_scope, so decode silently discards it). Exact post-#247 check: rebuild this catalog, decode ha_call_service (single) and one Mastodon derived non-conforming-explicit row through CatalogResponse → PluginRegistry → ProvenanceJoin, assert the F.5 verdict receives each enum unchanged. [verification] 2. Contract docs vs live behavior on single: email-v1.md/home-v1.md granularity-attestation sections nominally prescribe domain_scope:"single" for their ops, and domain-scope.md's own single examples include ha_state(entity_id=…). This spec classifies from live blade behavior instead (Gmail's per-record user-domain pattern engine partitions within one mailbox; HA reads fan into all providers when instance omitted), yielding 13 single / 145 derived per the declare-worse rule. New since the prior attempt: this judgement was embedded but never surfaced, and the prior gate issued no content verdict (verify never ran). Question: confirm the conservative live-behavior classification, or direct alignment with the contract-doc attestations (which would flip Gmail's 21 and some/all HA reads to single)? Approving the spec as-is confirms the conservative reading. [decision] **Change:** Retain enforceDomainScope() at scripts/build-catalog.js:190-242 as the sole 5th-axis derivation seam; branch non_conformance_rationale in schemas/catalog-entry.schema.json:154-198 (required:["reason"] + dependentRequired quartet-triangle + anyOf[affected_tools|domain_scope_unspecified] + minItems:1) so a domain-only rationale is expressible without falsely asserting scope_filtering_off; declare domain_scope:"single" on exactly the 13 HA handlers with live _write_gate(instance) call sites (ha server.py:906-1331), list the other 145 tools (21 Gmail + 23 HA + 45 Mastodon + 18 Tailscale + 38 Syncthing) in per-file domain_scope_unspecified for derived non-conforming-explicit (zero multi — no blad… **Files:** `plugins/tools/gmail-blade-mcp.json` · `plugins/tools/home-assistant-blade-mcp.json` · `plugins/tools/mastodon-blade-mcp.json` · `plugins/tools/tailscale-blade-mcp.json` · `plugins/tools/syncthing-blade-mcp.json` · `schemas/catalog-entry.schema.json` · `scripts/build-catalog.js` · `scripts/catalog-entry.schema.test.js` · `scripts/domain-scope.test.js` **Your call** (when this issue is held by flow-drain via `svd:hold`): - add label `svd:go` — approve; the next tick dispatches exactly this spec (open risks accepted) - add label `svd:skip` — park it; the drain drops it and the issue stays for a human - add label `svd:respec` — discard this spec; the next tick re-runs Half-A fresh with this record as prior-attempt context <sub>Spec: `/Users/piers/master-ai/atlas/utilities/agent-harness/specs/2026-07-17-backfill-granularity-domain-scope-across-158-catalog-tools.md` — resume with `approvedSpecPath` set to it.</sub>
piersdd commented 2026-07-16 21:05:56 +00:00 (Migrated from github.com)

This was generated by AI during the Wave 2 (P3) SVD close-out.

Shipped: PR #38 squash-merged as 4b21440e. Effective domain_scope distribution 13 single / 145 non-conforming-explicit across the 5 blade catalogs, per the approved spec. Cross-repo consumer gap (harness GranularityDeclaration.domainScope) tracked at Groupthink-dev/stallari-harness#247.

> *This was generated by AI during the Wave 2 (P3) SVD close-out.* Shipped: PR #38 squash-merged as `4b21440e`. Effective domain_scope distribution 13 `single` / 145 `non-conforming-explicit` across the 5 blade catalogs, per the approved spec. Cross-repo consumer gap (harness `GranularityDeclaration.domainScope`) tracked at Groupthink-dev/stallari-harness#247.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Stallari/plugins#35
No description provided.