Skip to content

Merge Orchestration · scheduled trigger: Scheduler.cycle + mix hypatia.merge_orchestrate#496

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/peaceful-pascal-IRlgq
Jun 14, 2026
Merged

Merge Orchestration · scheduled trigger: Scheduler.cycle + mix hypatia.merge_orchestrate#496
hyperpolymath merged 1 commit into
mainfrom
claude/peaceful-pascal-IRlgq

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

The scheduled trigger — closes the autonomy loop

Every piece of the pipeline is merged, but nothing invokes it on a schedule. This is that entry point: one cron/CI call runs the whole sense → deliberate → gate → manifest loop, with the live Graph-of-Trust snapshot finally feeding the competence council.

Scheduler.cycle/1

Assembles the live inputs the pure Loop deliberately doesn't:

  • Store resolutionopts[:store]MERGE_ORCH_STORE env → data/verisim default.
  • Live trust snapshot — snapshots GraphOfTrust into the council via KinCompetence.trust_from_got/2 over the fleet roster. The :got source:
    • :auto (default) builds a live Hypatia.Neural.GraphOfTrust snapshot, degrading to a uniform council on any failure — a scheduled job must never crash the cron;
    • nil forces uniform; a struct is used directly.
  • Runs Loop.run/1, logs the cycle stats.

The GraphOfTrust call is late-bound (apply/3) so this module stays compile-decoupled from the neural stack and the logic tests run dependency-free. (GraphOfTrust.trust_score/2 defaults unknown entities to 0.5 neutral, so an un-scored fleet bot is neutral, not silenced.)

mix hypatia.merge_orchestrate

The canonical scheduled entry point (mirrors the existing mix hypatia.record_outcome pattern):

mix hypatia.merge_orchestrate [--store PATH] [--holder NAME]

Boots the app, runs one cycle, prints the summary. Invoke from cron / CI.

The brain stays token-free: the cycle only reads the store and writes the manifest; the .git-private-farm actuator (separate, PAT-bearing) performs the merges.

Testing (actual, not looks-right)

61 ExUnit, 0 failures (was 58) under Elixir 1.14, mix-format-clean, scanner-clean:

61 tests, 0 failures

The +3 Scheduler tests prove the trust snapshot engages end-to-end:

  • a cycle with no trust source runs a uniform council and arms the bump;
  • a cycle with a GoT giving the sole approver ci trust 0.0ci recuses → the bump is flagged, not armed (the competence weighting fires through Scheduler → Loop → KinCompetence → KinCouncil → Strategist for real);
  • the MERGE_ORCH_STORE env fallback resolves the store when --store is omitted.

Scope / safety

  • Not auto-armed — core-tier lib/ + a Mix task, your review.
  • Additive: Scheduler + the Mix task + its test. No change to any existing module. I chose a Mix task (cron-invokable, no supervision-tree risk) over wiring a new GenServer into application.ex.

Where this leaves it

The full loop now runs from a single mix hypatia.merge_orchestrate. What remains is purely scheduling + owner items, no new brain logic:

  1. Point a cron / GenServer tick at the Mix task (e.g. a tick on learning_scheduler, or a CI cron) — a one-liner.
  2. Owner follow-ons: a5 standards adoption; P3 handshake + mass_squash in the actuator; the farm Actions-billing fix (so the actuator can run scheduled).

Generated by Claude Code

… hypatia.merge_orchestrate

Closes the autonomy loop: one cron/CI entry point that runs the whole
sense -> deliberate -> gate -> manifest pipeline in a single call.

  * Scheduler.cycle/1 -- assembles the LIVE inputs the pure Loop doesn't:
    resolves the store (opt | MERGE_ORCH_STORE env | data/verisim default),
    snapshots Graph-of-Trust into the competence council via
    KinCompetence.trust_from_got over the fleet roster, then runs Loop.run and
    logs the stats. Trust source (:got): :auto (default) builds a live
    Hypatia.Neural.GraphOfTrust snapshot, degrading to a uniform council on any
    failure (a scheduled job must never crash the cron); nil forces uniform; a
    struct is used directly. The GraphOfTrust call is late-bound (apply/3) so
    this module stays compile-decoupled from the neural stack and the logic
    tests run dependency-free.
  * mix hypatia.merge_orchestrate [--store PATH] [--holder NAME] -- the canonical
    scheduled entry point; boots the app, runs one cycle, prints the summary.

The brain stays token-free: the cycle only READS the store and WRITES the
manifest; the .git-private-farm actuator (separate, PAT-bearing) merges.

61 ExUnit (was 58): +3 Scheduler -- uniform-council-arms, a zero-trust sole
approver recuses to flagged (GoT trust engaged end to end through the council),
and the MERGE_ORCH_STORE env fallback. 0 failures, local elixir 1.14,
mix-format-clean, scanner-clean.

The full loop now runs from a single 'mix hypatia.merge_orchestrate'. Scheduling
it (cron / GenServer tick) + the owner follow-ons are all that remain.
@hyperpolymath hyperpolymath merged commit 61fa135 into main Jun 14, 2026
34 checks passed
@hyperpolymath hyperpolymath deleted the claude/peaceful-pascal-IRlgq branch June 14, 2026 12:46
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 42 issues detected

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 42
View findings
[
  {
    "reason": "Repository has 5 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 -- 11 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 -- 11 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 -- 11 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 -- 11 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 -- 11 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 -- 11 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 -- 11 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 -- 11 day(s) old",
    "type": "CSA001",
    "file": "docs/integration/a2ml-k9.md",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  },
  {
    "reason": "Code scanning (Hypatia): hypatia/structural_drift/SD022 -- Hypatia structural_drift: SD022 -- 11 day(s) old",
    "type": "CSA001",
    "file": "docs/architecture/system-integration.md",
    "action": "review",
    "rule_module": "code_scanning_alerts",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

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