Skip to content

Repair gonol authority and canonicalize ai.sh - #101

Merged
erinepshovel-code merged 36 commits into
mainfrom
repair/authority-and-ai-launcher
Sep 13, 2026
Merged

erinepshovel-code merged 36 commits into
mainfrom
repair/authority-and-ai-launcher

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Contributor

Repairs two live skill-lib defects.

  • Removes active EDCM ownership of gonol/text construction from gonol-build, char-compress, generated adapter metadata, tests, and org-facing projections.
  • Replaces the active EDCM construction witness with a local fail-closed gonol-authority regression gate: UCNS owns gonol objects/constructors/geometry; Stack owns active language-gonol construction research; EDCM owns measurement/evaluation only.
  • Adds the canonical Termux-side tools/ai.sh launcher for the a0 VM (0:shell, 1:grok, 2:codex, 3:deepcode), including actual pane health, explicit restart, remain-on-exit, persistent remote logs, and presence-only propagation of already-existing VM provider keys into tmux.
  • Adds tools/install_ai.sh to symlink canonical ai.sh into caller PATH, preferring Termux $PREFIX/bin and otherwise ~/.local/bin.
  • Adds launcher/authority tests and updates CI/MSDMD/tool documentation.

Historical EDCM constructor identities remain replay history only; no new language construction or ESS/ZFAE work is claimed here.

hmmm: third-party CLI executable names/authentication may change; command overrides remain explicit.

erinepshovel-code and others added 28 commits September 12, 2026 20:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T04:28:49.777045Z 8f3d616 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 8f3d61631c

ℹ️ 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 tools/check_gonol_authority.sh Outdated
ORG_DISTRIBUTION.md
skills.json
tests/test_gonol_build_skill.py
tests/test_char_compress_authority.py

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Exclude negative-test sources from the authority scan

tests/test_char_compress_authority.py intentionally contains self.assertNotIn("EDCM owns text-domain gonol construction", text), so including that file in active_files guarantees the rejection loop finds the forbidden literal in the test itself. Consequently, the new Gonol authority gate step in .github/workflows/ci.yml always exits nonzero; bash tools/check_gonol_authority.sh currently reports this file as stale even though the assertion is guarding against that doctrine.

Useful? React with 👍 / 👎.

Comment thread gonol-build/SKILL.md Outdated
## Candidate boundary

An unresolved constructor is permission to construct a named, bounded candidate; it does not block declared experimentation. It blocks promotion beyond the evidence, not construction or testing.
An unresolved constructor or geometry operation is permission to construct a named, bounded candidate only where the declared evidence permits it. It blocks promotion beyond the evidence, not honest experimentation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the candidate-boundary regression contract

Replacing “does not block declared experimentation” here leaves the unchanged test_ucns_option_selection_skill.py::test_unresolved_authorizes_candidate_work_not_promotion assertion unsatisfied. Because .github/workflows/ci.yml runs full unit-test discovery before the other gates, this commit makes every CI run fail; retain the asserted contract wording or update the dependent regression test with the doctrinal change.

Useful? React with 👍 / 👎.

Comment thread tools/install_ai.sh
BIN_DIR="$HOME/.local/bin"
fi

TARGET="$BIN_DIR/ai.sh"

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 Install the documented ai executable

The installer always creates $BIN_DIR/ai.sh, while the root README, CLAUDE.md, and module declaration promise ~/.local/bin/ai and demonstrate commands such as ai status. On a clean installation, those documented commands remain unavailable unless an unrelated ai command already exists; install the symlink under ai or consistently document ai.sh.

AGENTS.md reference: AGENTS.md:L196-L197

Useful? React with 👍 / 👎.

Comment thread tools/ai.sh
@@ -0,0 +1,303 @@
# ratios: loc_comments=hmmm imports_exports=hmmm calls_definitions=hmmm

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 installed launcher directly executable with Bash

The executable launcher has no shebang even though the installer exposes it as a PATH command. Direct execution therefore either returns ENOEXEC or falls back to /bin/sh; with dash, it immediately fails on set -o pipefail—reproduced by invoking the installed symlink from env. Add a Bash shebang before the ratios seal, which the repository's ratios convention explicitly permits.

AGENTS.md reference: AGENTS.md:L196-L197

Useful? React with 👍 / 👎.

Comment thread tools/ai.sh
Comment on lines +175 to +176
if [[ "$existed" == 0 || "$dead" == 1 ]]; then
respawn "$name" "$command_line"

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 Retry panes that never launched their agent

If an agent executable is absent on the first start, ensure_window_shell has already created a live login-shell pane before respawn returns 127. After the executable is installed, subsequent starts see existed=1 and pane_dead=0, so this condition never retries the agent and the named window remains an ordinary shell indefinitely; verify the current pane command or otherwise retain failed-launch state when deciding to respawn.

Useful? React with 👍 / 👎.

Comment thread tools/ai.sh
Comment on lines +94 to +95
command="cat >> \"\$HOME/$REMOTE_LOG_SUBDIR/$name.log\""
remote "mkdir -p \"\$HOME/$REMOTE_LOG_SUBDIR\"; tmux pipe-pane -o -t $(q "$target") $(q "$command")"

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 Restrict permissions on persistent pane logs

On a VM with more than one local user, these persistent pane logs are created under the caller's normal umask, commonly yielding a traversable directory and world-readable log files. Coding-agent pane output can contain prompts, source, command output, or accidental credentials, so the launcher should set a restrictive umask and enforce private directory/file modes before attaching the pipe.

Useful? React with 👍 / 👎.

Comment thread tools/ai.sh
# === MODULE_BUILD ===
# id: skill_lib_ai_launcher
# module_name: ai
# module_kind: cli

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 Use schema-supported MODULE_BUILD kinds

The repository's meta-module-build/SKILL.md limits module_kind to its declared enum, which does not include cli; the other new blocks likewise use unsupported checker and installer values. Since these declarations are intended for machine parsing and coordination, introducing undeclared kinds makes consumers interpret or reject them inconsistently; map the modules to supported kinds or extend the authoritative schema first.

AGENTS.md reference: AGENTS.md:L120-L121

Useful? React with 👍 / 👎.

Comment thread char-compress/SKILL.md
---
name: char-compress
description: Character-based context compression for agent handoff and skill writing, owned as a skill-lib procedure rather than current UCNS mathematics. Use this when compressing a long thread, document, repo audit, canon handoff, or agent working-memory state; when a context window is filling and operative facts must survive; when writing a SKILL.md that should be flesh-dense and bone-sparse; or when checking whether a compression deleted negation, order, quantifier, operator, named object, value, decision, or unresolved hmmm. Historical bone/flesh and text-stack terminology is local compression notation, not a UCNS theorem/status transfer, EDCM constructor, or edcmbone metric implementation.
description: Character-based context compression for agent handoff and skill writing, owned as a skill-lib procedure rather than current UCNS mathematics. Use this when compressing a long thread, document, repo audit, canon handoff, or agent working-memory state; when a context window is filling and operative facts must survive; when writing a SKILL.md that should be flesh-dense and bone-sparse; or when checking whether a compression deleted negation, order, quantifier, operator, named object, value, decision, or unresolved hmmm. Historical bone/flesh and text-stack terminology is local compression notation, not a UCNS theorem/status transfer, active language-construction authority, or edcmbone metric implementation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Regenerate the char-compress plugin adapter

Changing this canonical frontmatter without regenerating skills/char-compress/SKILL.md leaves the plugin-facing activation description on the previous text. The Codex plugin adapter drift step in .github/workflows/ci.yml runs python tools/build_codex_plugin_skills.py --check, which now exits 1 with drift: skills/char-compress/SKILL.md; regenerate and commit that adapter with the source change.

AGENTS.md reference: AGENTS.md:L68-L69

Useful? React with 👍 / 👎.

Comment thread CLAUDE.md
| `a0p-instancing/` | procedural | — | Peer for a0-betatest (a0p): agents are per-user CRUD `AgentInstance` + `CharacterSheet`, each owning a trained native ZFAE weight bank (three 157-seed cores); no `sub_agent_spawn`/executor/`InstanceMerge` — only volatile `MemoryCore.spawn_sub/merge_sub`. Sequence: create→distill-train→readiness gate→mode inference→sentinel/pending-override→safetensors checkpoint. Canonical source is `a0-betatest`. |
| `plain-lens/` | procedural | — | Plain-language, multi-lens companion views of dense canonical text. Build easier on-ramps (domain/audience/role lens selectors, progressive disclosure) that never replace or talk down to the source, keep a static fallback under any dynamic layer, preserve operators/negations/quantifiers, and report an EDCM-style body-vs-footnote tension reading as an illustrative heuristic (not an edcmbone metric runtime). |
| `gonol-build/` | procedural | — | UCNS geometry / EDCM text construction discipline. Resolve current owning contracts and admissible scale options; preserve closure, atomic participation, occurrence identity, full-source receipts, and protocol-required replay. Refuses superseded omega/phi/psi, bone/flesh, and carrier-LCM language doctrine. |
| `gonol-build/` | procedural | — | UCNS gonol objects/constructors/geometry + Stack language-construction research discipline. Resolve the owning Stack workspace, preserve closure, atomic participation, occurrence identity, constitutive relations, provenance, and required replay; EDCM is measurement/evaluation only. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove the stale EDCM instruction from CLAUDE.md

This updated catalogue row says Stack owns language construction and EDCM is measurement-only, but the same agent guidance still says at CLAUDE.md:255 to resolve “EDCM admissible scale options” before gonol work. Agents following the operational rules therefore receive the superseded authority assignment despite this commit's stated repair; update that instruction to resolve the owning Stack workspace and current UCNS authority as well.

AGENTS.md reference: AGENTS.md:L148-L154

Useful? React with 👍 / 👎.

Comment thread tools/ai.sh
Comment on lines +242 to +243
if [[ "$agent" != shell && ( "$existed" == 0 || "$dead" == 1 ) ]]; then
respawn "$name" "$command_line"

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 Respawn a dead shell before attaching

Because remain-on-exit is enabled, an exited shell remains as a dead pane; this condition explicitly excludes shell, so ai shell selects and attaches to that dead pane instead of restoring a usable login shell. Handle a dead shell through the shell respawn path before attaching.

Useful? React with 👍 / 👎.

@erinepshovel-code
erinepshovel-code merged commit c153ab8 into main Sep 13, 2026
4 of 5 checks passed
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