Skip to content

docs(design): protected subjects & reflexivity taxonomy (advisory) - #475

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/gallant-shannon-82193p
Jun 13, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
claude/gallant-shannon-82193p

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What

A design advisory (no pipeline code changed) for a recurring class of risk surfaced by the empty-linter PR #21/#22 incident: Hypatia treats nearly every subject uniformly, but a minority are part of the apparatus, fan out estate-wide, or define our own languages/formats — and acting on those can start a runaway change process or break many repos at once.

Doc: docs/design/protected-subjects-reflexivity-taxonomy.adoc.

The proposal in one breath

Generalise the mechanism the license cap already uses (cicd_rules.ex license_finding_strategy/0 ⇒ :review) into a subject-criticality policy, enforced in Kin.Gate and expressed in the vocabulary of Kin.Contingency :caution. One engine, not two rulesets — detection stays unified; only disposition changes.

  • Taxonomy: 4 orthogonal axes (Ownership/Influence · Role · Reflexivity · Blast radius) → 7 composable classes (C0 Ordinary … C6 Third-party).
  • Runaway brakes: no-self-actuation invariant (Graph of Trust cycle detection) · oscillation damper (LSM/ESN → Quarantine) · per-subject-class convergence budget (Rate Limiter).
  • Priority: severity × blast_radius × PageRank-centrality → high-consequence subjects surface first, but capped at :review (do-first-with-eyes).
  • Upstream locus: owned-upstream ⇒ fix the class once at source (the recipe / .git-private-farm template), not per downstream copy.
  • Actuation distinction: observer vs actuator × ordinary vs reflexive → the actuator × reflexive cell is locked to owner-review.
  • Special cases placed: rhodibot (bot=C2 vs template=C4) · echidnabot/panicbot (C3 tool-twin) · a2ml/k9-svc/gossamer/burble/AffineScript (C5 self-language — treat findings as possible stale-spec signals, never auto-rewrite).

Why now

The WF017 broken-gate recipe was auto-applied to a CI/CD-critical repo and took .git-private-farm propagation down. Under this design, empty-linter classifies as C1 (CI/CD-load-bearing, estate-wide): the auto-fix is capped at :review, guarded by actionlint + dry re-scan, and fix_locus points upstream at the recipe + template — so the broken edit never lands unattended.

Status

Design for owner review — do not implement until the taxonomy and class dispositions are agreed (C2/C5 owner-gates change fleet behaviour on the safety-critical path). Four open questions for you are listed at the end of the doc.

https://claude.ai/code/session_01EqEysvTPzPwhS9ZGY7EYdr


Generated by Claude Code

@hyperpolymath
hyperpolymath marked this pull request as ready for review June 13, 2026 16:41
@hyperpolymath
hyperpolymath force-pushed the claude/gallant-shannon-82193p branch from e77fb8a to 3a668a6 Compare June 13, 2026 16:41
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 44 issues detected

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 44
View findings
[
  {
    "reason": "Issue in codeql.yml",
    "type": "codeql_missing_actions_language",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Repository has 6 non-main remote branch(es). Policy: single main branch only.",
    "type": "GS007",
    "file": ".",
    "action": "delete_remote_branches",
    "rule_module": "git_state",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "src/ui/gossamer/README.adoc",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "scripts/ci-tools/Cargo.toml",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "scripts/bench-tools/Cargo.toml",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "ffi/zig/README.adoc",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "docs/reports/audit/audit-2026-04-15-post.md",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "docs/integration/github-registry.adoc",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "docs/integration/github-registry.adoc",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "docs/integration/a2ml-k9.md",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

Generalises the existing license-finding cap into a subject-criticality
policy so Hypatia recognises CI/CD-load-bearing, reflexive, and
self-language subjects and disposes of their findings differently: cap
auto_execute, prefer upstream fix locus, prioritise by blast radius, and
lock the actuator x reflexive cell against runaway. Names a taxonomy
(4 axes, 7 classes) and a single-engine pathway enforced in Kin.Gate.

Motivated by the empty-linter PR #21/#22 incident (a broken WF017 recipe
auto-applied to a CI/CD-critical repo took estate propagation down).
Design for owner review; no pipeline code changed.

https://claude.ai/code/session_01EqEysvTPzPwhS9ZGY7EYdr
@hyperpolymath
hyperpolymath force-pushed the claude/gallant-shannon-82193p branch from 3a668a6 to cc3bd95 Compare June 13, 2026 17:02
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 44 issues detected

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 44
View findings
[
  {
    "reason": "Issue in codeql.yml",
    "type": "codeql_missing_actions_language",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Repository has 6 non-main remote branch(es). Policy: single main branch only.",
    "type": "GS007",
    "file": ".",
    "action": "delete_remote_branches",
    "rule_module": "git_state",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "src/ui/gossamer/README.adoc",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "scripts/ci-tools/Cargo.toml",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "scripts/bench-tools/Cargo.toml",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "ffi/zig/README.adoc",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "docs/reports/audit/audit-2026-04-15-post.md",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "docs/integration/github-registry.adoc",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "docs/integration/github-registry.adoc",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 10 day(s) old",
    "type": "CSA001",
    "file": "docs/integration/a2ml-k9.md",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath
hyperpolymath merged commit 5168aac into main Jun 13, 2026
35 checks passed
@hyperpolymath
hyperpolymath deleted the claude/gallant-shannon-82193p branch June 13, 2026 17:05
hyperpolymath added a commit that referenced this pull request Jun 13, 2026
## What

Adds `language: actions` (`build-mode: none`) to hypatia's `codeql.yml`
matrix, so CodeQL scans workflow YAML for CI/CD-specific weaknesses.
Clears hypatia's own `workflow_audit` `codeql_missing_actions_language`
(WF020) finding — the same fix landed in empty-linter#22.

## Why this is a per-repo patch, not the real fix

WF020 recurs **estate-wide** — dozens of `codeql.yml` copies across the
`standards` monorepo's sub-repos are missing `language: actions`. That
is the `fix_locus: upstream` case from the reflexivity advisory (#475):
the canonical fix is **once**, in the shared `.git-private-farm` codeql
template, then propagated. I can't reach `.git-private-farm` from this
session's scope, so this is the in-repo fix for hypatia (a
CI/CD-critical, reflexive subject — done here only because you
explicitly authorized the cleanup).

I deliberately did **not** bulk-edit the ~30 `codeql.yml` copies in the
`standards` monorepo: several live in protected carve-out repos
(`palimpsest-license`, `consent-aware-http`) and self-language repos
(`a2ml`, `k9-svc`), which the advisory says must not be swept.

## Validation
- Matrix now lists `javascript-typescript` + `actions`.
- Matches the regex WF020 checks for (`language:\s*actions`), and the
exact pattern verified-green in empty-linter#22 (the `analyze (actions,
none)` job).

https://claude.ai/code/session_01EqEysvTPzPwhS9ZGY7EYdr

---
_Generated by [Claude
Code](https://claude.ai/code/session_01EqEysvTPzPwhS9ZGY7EYdr)_

Co-authored-by: Claude <noreply@anthropic.com>
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