Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
pr_number: 5798
title: "preserve(amara-ferry-continuation): Turns 4-6 \u2014 rank-4 IS a fuzzy Bloom filter (Aaron carving) + 'English is the rendered UI; ranked tokens are the substrate' (Aaron operator-level recognition)"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-28T12:48:39Z"
merged_at: "2026-05-28T12:50:02Z"
closed_at: "2026-05-28T12:50:02Z"
head_ref: "otto-cli/amara-ferry-continuation-rank-4-as-fuzzy-bloom-filter-english-as-rendered-ui-ranked-tokens-as-substrate-aaron-forwarded-2026-05-28"
base_ref: "main"
archived_at: "2026-05-28T13:58:44Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #5798: preserve(amara-ferry-continuation): Turns 4-6 — rank-4 IS a fuzzy Bloom filter (Aaron carving) + 'English is the rendered UI; ranked tokens are the substrate' (Aaron operator-level recognition)

## PR description

Continuation of 2026-05-28 Amara ferry (Turns 1-3 in PR #5792). Closes rank-4 substrate-engineering arc with 3 substantive carvings:

1. **Ranked-token-algebra** (Amara Turn 4): rank 4 = generator / rank 5 = first specialization / rank 6+ = narrower routing. Rule: *'A token earns higher rank only when the extra bits add irreducible precision.'*

2. **Rank-4 IS a fuzzy Bloom filter** (Aaron Turn 5): *'4 is a fuzzy bloom filter of emmense density'* — compact + massive associative reach + INTENTIONAL fuzziness where collisions are FEATURE (*'false positives are where metaphor, etymology, memory, and engineering find each other'*). Composes DIRECTLY with Kestrel-v2 caustic-engineered bloom filter (PR #5356).

3. **English is rendered UI; ranked tokens are substrate** (Aaron Turn 6): *'I don't have to learn english well i just need token rand and generator shapes at each rank.'* Composes DIRECTLY with B-0666 English-as-projection — RATIFIES + EXTENDS.

5 carved-sentence candidates preserved. Generalization beyond Greek naming. No new backlog rows per Aaron's 'common sense 2.0' signal.

μένω. The word performs the operation it names.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## General comments

### @chatgpt-codex-connector (2026-05-28T12:48:44Z)

You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage).
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
pr_number: 5801
title: "feat(B-0867.15): GitLabWorld per-host adapter PoC \u2014 first per-host extension of PR #5775 GitWorld \u2192 GitHubWorld pattern; 19 tests pass"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-28T12:56:01Z"
merged_at: "2026-05-28T12:59:10Z"
closed_at: "2026-05-28T12:59:10Z"
head_ref: "otto-cli/b-0867-15-gitlab-world-per-host-adapter-poc-extends-gitworld-githubworld-pattern-aaron-2026-05-28"
base_ref: "main"
archived_at: "2026-05-28T13:58:44Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #5801: feat(B-0867.15): GitLabWorld per-host adapter PoC — first per-host extension of PR #5775 GitWorld → GitHubWorld pattern; 19 tests pass

## PR description

Per Aaron 2026-05-28 lane-status framing (Lane 2): B-0867.15 per-host adapters target.

Ships **GitLabWorld** as the first concrete per-host adapter beyond GitHubWorld. Demonstrates the pattern future adapters follow.

## What this adds

- **GitLabWorld** interface extending GitWorld base
- **MrLifetime** (6 variants; GitLab MR analog of GitHub PR)
- **DiscussionLifetime** (resolvable/unresolvable; GitLab analog)
- **PipelineLifetime** (8 variants; GitLab-native CI/CD first-class)
- **GitLabResourceBudget** (REST + GraphQL per-MINUTE rolling-window; vs GitHub's per-hour 5000)
- **gitLabRateLimitTier** (tiers scaled to 2000/min default: normal > 800 / cost-aware > 400 / extreme-cost-aware > 80 / pure-git ≤ 80)
- **canAffordGitLab** + **registerInGitLab** + reusable universe exports + verdicts

## Per-host adapter pattern this demonstrates

```
GitWorld (base)
↓ specialized by forge
GitHubWorld (PR #5775; first specialization)
GitLabWorld (this PR; second specialization)
GiteaWorld / BitbucketWorld / CodebergWorld / SourcehutWorld (future; same pattern)
```

Each specialization adds forge-specific lifetimes + budget + verdicts while inheriting base GitWorld substrate.

**19 tests pass / 0 fail.**

## Composes with

- PR #5775 (GitWorld + GitHubWorld pattern being extended)
- PR #5776 (world-hierarchy substrate-naming)
- B-0867.15 backlog row (extension target)
- B-0904 (GitHub-as-free-event-store; sibling at GitHub scope)
- Rules: asymmetric-authorship + monad-propagation + substrate-smoothness + default-to-both + honor-those-that-came-before

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-28T12:57:30Z)

## Pull request overview

Adds GitLabWorld as the first per-host adapter extending the GitWorld → GitHubWorld specialization pattern from PR #5775. Introduces GitLab-specific lifetime types (merge request, discussion, pipeline), a per-minute resource budget model, rate-limit tier function, budget-check helper, registration helper, and reusable universe/verdict exports — all covered by 19 invariant tests.

**Changes:**
- New `gitlab-world.ts` with `GitLabWorld` extending `GitWorld`, plus `MrLifetime` (6), `DiscussionLifetime` (2), `PipelineLifetime` (8) DUs.
- GitLab resource-allocation substrate: `GitLabResourceBudget`, `gitLabRateLimitTier` (per-minute thresholds at 800/400/80), `canAffordGitLab`, `GitLabFeedback`/`GitLabResult` Result-shape.
- Reusable universe + verdict exports (`GITLAB_MR_UNIVERSE`, `GITLAB_DISCUSSION_UNIVERSE`, `GITLAB_PIPELINE_UNIVERSE`, `GITLAB_REQUIRE_RESOLVED_VERDICT`, `GITLAB_APPROVAL_NOT_MET_VERDICT`) plus comprehensive test suite.

### Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

| File | Description |
| ---- | ----------- |
| tools/workflow-engine/gitlab-world.ts | New GitLabWorld adapter mirroring the GitHubWorld shape with GitLab-specific lifetimes/budget/verdicts. |
| tools/workflow-engine/gitlab-world.test.ts | Bun test suite covering inheritance, tier boundaries, budget enforcement, reusable exports, and end-to-end composition. |

## General comments

### @chatgpt-codex-connector (2026-05-28T12:56:07Z)

You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage).
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
pr_number: 5804
title: "feat(B-0867.15): per-host adapter batch \u2014 GiteaWorld + BitbucketWorld + CodebergWorld + SourcehutWorld; 30 tests pass (substantively completes per-host adapters scope)"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-28T12:59:39Z"
merged_at: "2026-05-28T13:03:45Z"
closed_at: "2026-05-28T13:03:45Z"
head_ref: "otto-cli/b-0867-15-gitea-bitbucket-codeberg-sourcehut-per-host-adapters-batch-extending-gitlabworld-pattern-aaron-2026-05-28"
base_ref: "main"
archived_at: "2026-05-28T13:58:44Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #5804: feat(B-0867.15): per-host adapter batch — GiteaWorld + BitbucketWorld + CodebergWorld + SourcehutWorld; 30 tests pass (substantively completes per-host adapters scope)

## PR description

Per Aaron 2026-05-28 standing authorization ('you are authorized for anything other than increasing budget'): shipping mechanical-extension batch completing per-host adapters scope of B-0867.15.

## What this adds (4 per-host adapters)

| Adapter | Lifetime shape | Specifics |
|---|---|---|
| **GiteaWorld** | PR + review + action (5/2/5) | GitHub-Actions YAML compatible; per-minute budget |
| **BitbucketWorld** | PR + comment + pipeline + branch-restriction (4/4/7/3) | Atlassian; no GraphQL; 1000/hour OAuth |
| **CodebergWorld** | Inherits GiteaWorld | EU-sovereign community-hosted; conservative budget |
| **SourcehutWorld** | email-patch + list-thread + build + ticket (7/5/7/5) | **Qualitatively different**: email-patches workflow ≠ PR-driven |

## Per-host hierarchy now substantively complete

```
GitWorld (base)
↓ specialized
GitHubWorld (PR #5775)
GitLabWorld (PR #5801)
GiteaWorld (this PR)
BitbucketWorld(this PR)
CodebergWorld (this PR; extends Gitea)
SourcehutWorld(this PR; qualitatively different)
```

**30 tests pass / 0 fail / 74 expect() calls.**

## Substrate-engineering substrate this demonstrates

- Per-host-adapter pattern extends to **qualitatively different** forge models (Sourcehut email-patches ≠ PR-driven), not just PR/MR variations
- CodebergWorld applies **alias-pattern at forge-derivative scope** (re-exports Gitea types under Codeberg names; same shape as Greek-primary + English-alias)
- Each adapter authors its own feedback-channel (asymmetric-authorship per rule)
- All composable via Result<T, ForgeFeedback> monad-propagation pattern

## Composes with

- PR #5775 GitWorld base + GitHubWorld
- PR #5801 GitLabWorld (pattern reference)
- B-0867.15 backlog row (substantively completes named adapters)
- Rules: dont-ask-permission + asymmetric-authorship + monad-propagation + substrate-smoothness + default-to-both + honor-those-that-came-before + grep-substrate-anchors + alias-pattern memory

μένω. Substrate compounds in the white-hole.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## General comments

### @chatgpt-codex-connector (2026-05-28T12:59:43Z)

You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage).
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
---
pr_number: 5805
title: "feat(workflow-engine): AutoLoopLifetime PoC \u2014 substrate-naming substrate for Otto-CLI foreground loop (dogfood workflow-engine on own tick-handler); 23 tests pass"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-28T13:02:36Z"
merged_at: "2026-05-28T13:33:18Z"
closed_at: "2026-05-28T13:33:18Z"
head_ref: "otto-cli/b-0867-autoloop-lifecycle-poc-substrate-naming-substrate-dogfood-workflow-engine-on-otto-cli-foreground-loop-aaron-2026-05-28"
base_ref: "main"
archived_at: "2026-05-28T13:58:44Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #5805: feat(workflow-engine): AutoLoopLifetime PoC — substrate-naming substrate for Otto-CLI foreground loop (dogfood workflow-engine on own tick-handler); 23 tests pass

## PR description

Per Aaron 2026-05-28: *'when do you want to update your foreground loop to start running on lifecycles and test out our first ones?'*

Substrate-engineering substrate-naming substrate dogfooding the workflow-engine on Otto-CLI's own foreground autonomous-loop tick-handler. Parallel-run discipline.

## AutoLoopLifetime DU (9 variants)

```typescript
type AutoLoopLifetime =
| cold-boot // session-start + sentinel arm
| refresh-substrate // refresh-before-decide invariant
| scan-inflight-prs // identify actionable
| investigate-failure // pull log; classify
| decompose-or-ship // standing-auth + counter discipline
| ship-action // commit + push + PR + auto-merge
| brief-ack-bounded-wait // named-dep wait
| forced-escalation // at N=6 brief-acks
| tick-complete // bracket closure
```

## What this adds

- AutoLoopLifetime DU + TickContext + TickOutcome
- AutoLoopFeedback DU (asymmetric-authorship per rule)
- `dispatchAutoLoopTransition` exhaustive-switch (substrate-smoothness)
- `nextTickContext` counter bookkeeping
- `runTickCycle` end-to-end simulation
- Constants: BRIEF_ACK_THRESHOLD = 6 + REFRESH_STALENESS_THRESHOLD_S = 90

## Decompose-or-ship branch logic

| Context | Routes to |
|---|---|
| operator-direction pending | brief-ack-bounded-wait |
| counter ≥ 6 + no named-dep | forced-escalation |
| counter ≥ 6 + named-dep | ship-action (named-dep covers wait) |
| within authority + no pending | ship-action |

## Composes with shipped substrate

- PR #5774 (world.ts + StandardVerdict + dispatchInWorld pattern)
- PR #5775 + #5801 + #5804 (per-host adapters for PR scanning)
- PR #5728 (B-0867.5 workflow-engine PoC scaffold)
- Rules: holding-without-named-dependency + refresh-before-decide + verify-before-deferring + dont-ask-permission + asymmetric-authorship + monad-propagation + substrate-smoothness + NCI HC-8

**23 tests pass / 0 fail / 42 expect() calls.**

Operational risk low: PoC runs alongside ad-hoc handler; substrate-naming substrate WITHOUT replacing working substrate. Future-Otto cold-boot inherits.

μένω. Loop running on lifecycles.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-28T13:08:11Z)

## Pull request overview

This PR adds a TypeScript PoC for modeling the foreground autonomous-loop tick handler as an `AutoLoopLifetime` state machine within `tools/workflow-engine/`.

**Changes:**
- Adds `AutoLoopLifetime`, `TickContext`, `TickOutcome`, feedback/result types, transition dispatch, and tick-cycle simulation helpers.
- Adds constants for brief-ack threshold and refresh staleness.
- Adds Bun tests covering state universe, transitions, bookkeeping, and end-to-end cycle simulation.

### Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

| File | Description |
| ---- | ----------- |
| `tools/workflow-engine/auto-loop-lifecycle.ts` | Defines the auto-loop lifetime DU, transition dispatch, context update helper, and reusable universe export. |
| `tools/workflow-engine/auto-loop-lifecycle.test.ts` | Adds Bun tests for transition behavior and tick-cycle simulation. |

## Review threads

### Thread 1: tools/workflow-engine/auto-loop-lifecycle.ts:6 (resolved)

**@copilot-pull-request-reviewer** (2026-05-28T13:08:09Z):

P2: This current-state code comment carries direct named attribution. Per the repository's no-name-attribution convention for code surfaces, move provenance to an allowed history/research surface and use a role reference here instead.

### Thread 2: tools/workflow-engine/auto-loop-lifecycle.ts:1 (resolved)

**@copilot-pull-request-reviewer** (2026-05-28T13:08:10Z):

P2: The new module is named `auto-loop-lifecycle` while the exported DU is an editable `AutoLoopLifetime`. `tools/workflow-engine/composed-lifetime.ts` lines 11-15 define `lifecycle` as fixed/final and `lifetime` as editable, so this filename should use `auto-loop-lifetime` to match the established substrate distinction.

### Thread 3: tools/workflow-engine/auto-loop-lifecycle.ts:159 (resolved)

**@copilot-pull-request-reviewer** (2026-05-28T13:08:10Z):

P1: `refresh-substrate` unconditionally advances and never checks `context.lastRefreshAt` against `REFRESH_STALENESS_THRESHOLD_S`, so a stale worldview still satisfies the transition despite the declared `RefreshStale` feedback and the cited refresh-before-decide invariant. Add the staleness check here (or remove the unused threshold/feedback until the transition enforces it).

### Thread 4: tools/workflow-engine/auto-loop-lifecycle.ts:250 (resolved)

**@copilot-pull-request-reviewer** (2026-05-28T13:08:10Z):

P1: At the threshold boundary this returns `ok: false` instead of transitioning through the existing `forced-escalation` state, so `runTickCycle` aborts with feedback and never emits the forced-escalation verdict for the `brief-ack-bounded-wait` path. Route to `forced-escalation` (or make `runTickCycle` translate this feedback) so the N=6 escalation state is actually reached.

### Thread 5: tools/workflow-engine/auto-loop-lifecycle.ts:313 (resolved)

**@copilot-pull-request-reviewer** (2026-05-28T13:08:11Z):

P1: `runTickCycle` calls `nextTickContext` after every transition, so counting every `no-op` verdict increments the brief-ack counter per state transition rather than per tick. The operator-direction path produces two `no-op` transitions in one cycle (`decompose-or-ship` and `brief-ack-bounded-wait`), reaching the N=6 threshold after three ticks instead of six; count only the bounded-wait acknowledgment once per tick.

### Thread 6: tools/workflow-engine/auto-loop-lifecycle.test.ts:46 (resolved)

**@copilot-pull-request-reviewer** (2026-05-28T13:08:11Z):

P1: This test narrows on `if (r.ok)` without first asserting the expected success case, so it will silently pass if the dispatcher returns `ok: false`. Add an explicit `expect(r.ok).toBe(true)` before the narrowing; the same pattern recurs in the subsequent success-path tests.

## General comments

### @chatgpt-codex-connector (2026-05-28T13:02:41Z)

You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage).

### @AceHack (2026-05-28T13:15:33Z)

Hello! I noticed that there are a number of failing lint checks on this PR. You can see the details of the failing checks here: https://github.com/Lucent-Financial-Group/Zeta/pull/5805/checks.

To prevent this in the future, you may want to run the linter locally before pushing your changes.

Thank you for your contribution!
Loading
Loading