Passa al contenuto principale

ARSGATE Resource Ownership Registry & Discovery Gate

Status: Implemented by BOOT-004

Purpose​

Project Bootstrap is the canonical desired-state governance engine for structural ARSGATE resources. Before structural mutation, the system must discover and reconcile existing ownership rather than inferring non-existence from a local checkout, operator memory, or chat context.

Canonical Registry​

The machine-readable registry is:

registry/arsgate-resource-registry.yaml

It records stable component identity and declared ownership across Project Bootstrap manifests. Manifest declarations are distinct from live verification.

Discovery states​

  • EXISTS_REUSE
  • PARTIAL_EXTEND
  • CONFLICT_STOP
  • UNKNOWN_STOP
  • NOT_FOUND_AFTER_FULL_DISCOVERY_CREATE

UNKNOWN_STOP and CONFLICT_STOP are fail-closed states.

Required rules​

  1. Local absence never proves global non-existence.
  2. Existing canonical resources are reused or extended rather than duplicated.
  3. Exact logical keys are validated globally; numeric ranges are not inferred as ownership.
  4. Shared Forgejo repositories are valid when declared by canonical manifests.
  5. Manifest and Registry disagreement is a blocking conflict.
  6. Redmine and Forgejo declarations are not considered live-verified until queried.
  7. Active Git branch/worktree context is part of the project-governance preflight.
  8. Structural mutation must pass the Discovery Gate before external reconciliation begins.

Scope model​

project_governance requires:

  • canonical ownership
  • Redmine ownership/live discovery
  • Forgejo ownership/live discovery
  • exact logical keys
  • Git branch/worktree context

structural additionally requires:

  • runtime ownership
  • environment scope
  • canonical documentation ownership

Unknown dimensions that are required by the selected scope block execution. Dimensions not required by the selected scope are reported explicitly rather than silently ignored.

--add-related-issue performs discovery before mutation, verifies the candidate logical key against all canonical manifests and live Redmine, validates candidate manifest + Registry state, writes the local desired state coherently, and only then reconciles Redmine.

Mutation enforcement​

Mutating Project Bootstrap modes run the Discovery Gate before Redmine hierarchy reconciliation or other external mutation. A failed preflight returns without applying the requested mutation.

Proven tests for BOOT-004​

The implementation was validated with:

  • positive preflight: EXISTS_REUSE / READY: YES;
  • outside-repository target: UNKNOWN_STOP / READY: NO;
  • duplicate logical key: CONFLICT_STOP, with manifest and Registry hashes unchanged;
  • intentional Registry/manifest ownership mismatch: CONFLICT_STOP / READY: NO;
  • mutating --apply-redmine request with intentional conflict: blocked before Redmine hierarchy apply;
  • Python compilation and Git diff checks.

Authority​

The Registry and verified live sources are authoritative for the dimensions they own. ChatGPT/operator memory is never an authoritative existence or ownership source.

Cross-workstream conflict guard — 2026-09-25​

The same fail-closed ownership rule now applies to active AI workstreams. selectors and explicit resources are exclusive claims inside overlapping tenant/environment domains. Before discovery assignment and before normal scheduling, the Orchestrator checks all non-terminal workstreams; an overlap is held with active_workstream_conflict and no worker assignment is issued. Manual assignment uses the same check.

A worker that needs to enter a domain not declared by its workstream must use arsgate-orchestrator scope-expand. The expansion is committed only when no active workstream already owns the requested selector/resource. A collision is rejected and journaled as WORKSTREAM_SCOPE_CONFLICT.

This closes the class of failure where one task silently expands into a subsystem already owned by another active workstream.