Skip to content

feat(bifrons): make the star↔contribution portal autopoietic (a live beat organ)#956

Open
4444J99 wants to merge 1 commit into
mainfrom
worktree-bifrons-autopoiesis
Open

feat(bifrons): make the star↔contribution portal autopoietic (a live beat organ)#956
4444J99 wants to merge 1 commit into
mainfrom
worktree-bifrons-autopoiesis

Conversation

@4444J99

@4444J99 4444J99 commented Jul 11, 2026

Copy link
Copy Markdown
Member

"If it's not autopoietic, then it's not done." The Epic-6 loop mechanism (organvm-engine #167, merged) is a proof I run by hand; this makes BIFRONS alive — it runs itself on the heartbeat, reads its own past, surfaces its state, and asks nothing of the operator.

What lands

  • scripts/bifrons-organ.py — the beat face. Metabolizes its own state estate (globs ~/.organvm/bifrons + the portal store — the AVTOPOIESIS past-tense signature), runs one bounded effector cycle (organvm portal metabolize: absorb new stars → map resonance → prepare inbound draft PRs, never submits), re-renders organs/observation/bifrons/PORTAL.md. Fail-open, idempotent, deterministic. --check (omega det) / --doctor (omega live).
  • sensors.yaml — the bifrons-portal heartbeat sensor (source: [heartbeat], cadence LIMEN_BEAT_BIFRONS=24, ships LIVE): the single entry that makes it a discovered, scheduled door.
  • parameters.yamlLIMEN_BIFRONS (default 1 — read-only absorb + internal prepare, so it runs unbidden), LIMEN_BEAT_BIFRONS, LIMEN_BIFRONS_TIMEOUT, LIMEN_BIFRONS_BUDGET.
  • organ-ladder.json — BIFRONS rank 16, pillar observation.
  • organs/observation/bifrons/ — KERNEL / CHARTER / MACRO-FACE / MICRO-FACE + PORTAL.md.

Aliveness (the arbiter, not prose)

avtopoiesis.py counts bifrons-portal a LIVE door — score 0.835 (past 1.0 via the estate-crawl signature; present 0.5 = the normal heartbeat-sensor value, identical to GITVS; future 1.0 via zero owned levers — the one external write rides the existing outbound-send valve). check-sensors / check-params / check-gates exit 0; the bifrons omega det+live checks are registered and --check exits 0; ruff clean. The one system-wide nota (mat) is pre-existing and unrelated.

Merge note

This touches the live heartbeat (a new beat sensor) — per the sensor-merge canary gate it opens green and waits for operator release past canary. Not self-merged.

🤖 Generated with Claude Code

…e beat organ)

"If it's not autopoietic, it's not done." The Epic-6 loop mechanism (organvm-engine
heartbeat, reads its own past, surfaces its state, and asks nothing.

- scripts/bifrons-organ.py — the beat face. Metabolizes its own state estate
  (globs ~/.organvm/bifrons + the portal store — the AVTOPOIESIS past-tense
  signature), runs one bounded effector cycle (`organvm portal metabolize`, which
  absorbs new stars, maps resonance, prepares inbound draft PRs — NEVER submits),
  and re-renders organs/observation/bifrons/PORTAL.md. Fail-open, idempotent,
  deterministic render. --check (omega det) / --doctor (omega live).
- institutio/governance/sensors.yaml — the `bifrons-portal` heartbeat sensor
  (source: [heartbeat], cadence LIMEN_BEAT_BIFRONS=24, ships LIVE): the one entry
  that makes it a discovered, scheduled door.
- institutio/governance/parameters.yaml — LIMEN_BIFRONS (default 1: read-only
  absorb + internal prepare, so it runs unbidden), LIMEN_BEAT_BIFRONS,
  LIMEN_BIFRONS_TIMEOUT, LIMEN_BIFRONS_BUDGET.
- organ-ladder.json — BIFRONS rank 16, pillar observation.
- organs/observation/bifrons/ — KERNEL/CHARTER/MACRO-FACE/MICRO-FACE + PORTAL.md.

The single human atom (opening the upstream PR) rides the existing system-wide
outbound-send valve — BIFRONS owns ZERO levers, so its future-tense score is clean.

Verified: `avtopoiesis.py` counts `bifrons-portal` a LIVE door (score 0.835:
past 1.0, present 0.5 [the normal heartbeat-sensor value, == GITVS], future 1.0);
check-sensors / check-params / check-gates exit 0; the bifrons omega det/live
checks are registered and `--check` exits 0; ruff clean. The one system-wide nota
(`mat`) is pre-existing and unrelated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@4444J99 4444J99 force-pushed the worktree-bifrons-autopoiesis branch from 0afa3b4 to bdb001b Compare July 11, 2026 22:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0afa3b4a63

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/bifrons-organ.py
f"engine_cli={'yes' if cli else 'no'} "
f"stars={portal['counts']['external_repo']}")
# Fail-open: a not-yet-populated portal on a fresh host is not a defect.
return 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make the liveness doctor fail when the engine is absent

When organvm is not on PATH, this still returns success after printing engine_cli=no. Because sensors.yaml registers python3 scripts/bifrons-organ.py --doctor as the live omega check, omega will mark BIFRONS healthy even though run_beat() immediately skips and never metabolizes stars in that environment. The heartbeat path can remain fail-open, but the doctor should fail or explicitly skip when required live dependencies are absent.

Useful? React with 👍 / 👎.

Comment on lines +173 to 174
default: "1"
source: [heartbeat]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wire the live sensor past the dark derive gate

On hosts relying on repository defaults, this heartbeat-only sensor is still behind heartbeat-loop.sh's scheduled-registry guard if [ "${LIMEN_BEAT_DERIVE:-0}" = "1" ], so default: "1" here does not actually make BIFRONS run unless ~/.limen.env explicitly sets LIMEN_BEAT_DERIVE=1. That leaves the new portal dormant despite being declared live; either the heartbeat default needs to be flipped or this sensor needs a live path outside the dark derive gate.

Useful? React with 👍 / 👎.

Comment thread scripts/bifrons-organ.py
try:
subprocess.run( # noqa: S603
["organvm", "portal", "metabolize", "--budget", str(BUDGET), "--db", str(PORTAL_DB)],
check=False, capture_output=True, timeout=int(os.environ.get("LIMEN_BIFRONS_TIMEOUT", "180")),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Leave headroom for the inner metabolize timeout

The registry step already applies the same LIMEN_BIFRONS_TIMEOUT/180s timeout to the whole bifrons-organ.py process, so when organvm portal metabolize is slow this inner timeout fires at the same deadline as the outer process-group kill. In that scenario the Python process is killed before it can catch TimeoutExpired, render from existing state, or write logs/bifrons-portal.json, which defeats the documented fail-open behavior; use a smaller inner timeout or separate effector/render budgets.

Useful? React with 👍 / 👎.

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.

1 participant