Skip to content

feat(troika): complete all phases (5-6) + cross-dev review fixes#78

Merged
royosherove merged 10 commits into
mainfrom
feat/troika-complete
Jul 13, 2026
Merged

feat(troika): complete all phases (5-6) + cross-dev review fixes#78
royosherove merged 10 commits into
mainfrom
feat/troika-complete

Conversation

@royosherove

Copy link
Copy Markdown
Member

Summary

Completes the troika feature — all 6 phases done.

Phase 5: Preflight Codex-model probe

  • Added _check_codex_model_access() helper in install.sh
  • Probes openai.gpt-5.5 via bedrock-runtime converse, falls back to list-foundation-models
  • Non-fatal warning if both fail (doesn't block install)

Phase 6: Docs

  • Created docs/agents/troika.mdx (daily driver, review workflow, stack requirements)
  • Updated README.md pack tables with troika entry

Review fixes (2 rounds)

Round 1 (internal cross-dev review):

  • C1: Fixed shebang placement in generated agents script (line 1)
  • M1: Added --daily-driver vs --primary cross-validation in main installer
  • M2: Switched sentinel blocks to sed-based replace (re-runs update .bashrc)
  • m3: Dynamic summary output using PRIMARY/cmd vars

Round 2 (Claude Code / Codex review):

  • CRITICAL: sed sentinel-replace now counts occurrences before range delete — single-sentinel (corrupted) case removes just one line instead of deleting to EOF
  • MAJOR: Unknown-arg wildcard rewritten as readable if/else

Tests

  • packs/troika/test.sh: 59/59 ✅
  • tests/test-pack-contracts.sh: 155/155 ✅
  • shellcheck: clean (zero warnings)

Loki added 9 commits July 12, 2026 12:11
Troika — mixture of harnesses: OpenClaw + Claude Code + Codex CLI on one
instance, all via Bedrock. Registry entries (yaml+json), pack skeleton
(manifest, install.sh with daily-driver config, codex TOML merge, agents
helper, idempotent autolaunch block), contract tests + registry/sync test
expectations. Renamed from working title 'trifecta'.
…|roundhouse) via new 'primary' param; design implications for phase 3
…stitution, PACK_TUI_COMMAND as launch source, roundhouse Telegram-creds blocker, primary-aware driver default)
…openclaw|hermes only; resolves the Telegram-creds blocker, roundhouse deferred
…, descriptions → OpenClaw/Hermes; plan §12b clean-code requirements (single agent-metadata lookup, DRY plumbing, sentinel helpers)
…okup from PACK_TUI_COMMAND, VALID_DRIVERS/autolaunch/agents derive from it, daily-driver default tracks primary (§12a+§12b)
…odel plumbing, dep substitution

- deploy/bootstrap.sh: parse --primary/--daily-driver/--codex-model args (\u00a712a.1,
  \u00a712.1); add all three to PACK_CONFIG JSON; add get_effective_deps() helper that
  substitutes the 'openclaw' dep with the selected primary when pack=troika and
  primary\u2260openclaw (\u00a712b single helper, applied to BOTH step-counting and install
  dispatch, no-op when primary=openclaw or pack\u2260troika)

- install.sh: TROIKA_PRIMARY/DAILY_DRIVER/CODEX_MODEL CLI flags; check_pack_profile_compat()
  now reads compatible_profiles from registry and auto-selects first allowed profile
  (or fails fast on explicit --profile mismatch) \u2014 covers both troika and roundhouse;
  troika in pack_default_model(); pack-minimum instance sizing (\u00a712.4) added to
  collect_config_simple() as registry floor check; Primary/DailyDriver/CodexModel added
  to PARAM_CFN_NAMES+PARAM_VALUES (index-synced, harmless defaults for other packs);
  troika gum-choose questions for primary+daily-driver in run_config_and_review();
  Primary+Daily driver review summary lines when pack=troika

- deploy/cloudformation/template.yaml: troika in PackName AllowedValues; new params
  Primary (openclaw|hermes, default openclaw), DailyDriver (default empty), CodexModel
  (default openai.gpt-5.5); --primary/--daily-driver/--codex-model passthrough in
  UserData bootstrap.sh call; params added to Metadata ParameterGroups

- deploy/test-bootstrap.sh: Test 7 \u2014 get_effective_deps dep-substitution unit coverage
  (primary=openclaw no-op, primary=hermes substitutes, non-troika unaffected, order
  preserved)
Phase 5: Preflight Codex-model probe
- Added _check_codex_model_access() helper in install.sh
- Probes openai.gpt-5.5 via bedrock-runtime converse, falls back to
  list-foundation-models; non-fatal warning if both fail
- Triggers when PACK_NAME/PRESELECT_PACK=troika or TROIKA_CODEX_MODEL set

Phase 6: Docs
- Created docs/agents/troika.mdx (daily driver, review workflow, stack reqs)
- Updated README.md pack tables with troika entry

Review fixes (from cross-dev code review):
- C1: Fixed shebang placement in generated agents script (line 1)
- M1: Added --daily-driver vs --primary cross-validation in main installer
- M2: Switched sentinel blocks to sed-based replace pattern (re-runs update)
- m3: Dynamic summary output using PRIMARY/cmd vars

All tests pass: 59/59 troika, 155/155 pack contracts, shellcheck clean.
- CRITICAL: sed sentinel-replace now counts occurrences before range
  delete; single-sentinel (corrupted) case removes just the one line
  instead of deleting to EOF
- MAJOR: unknown-arg wildcard case rewritten as readable if/else
  (removes fragile &&...|| pattern)

Tests: 59/59 troika, 155/155 pack contracts, shellcheck clean.

@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: adf5b5f575

ℹ️ 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 packs/troika/resources/shell-profile.sh Outdated
# Troika shell profile — sourced by bootstrap for .bashrc and /etc/profile.d
# Covers all three harnesses: OpenClaw, Claude Code, Codex CLI
# shellcheck disable=SC2034 # Variables are exported/used by the bootstrap dispatcher
PACK_TUI_COMMAND="openclaw tui"

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 Honor the selected Troika driver in SSM sessions

When Troika is installed with --primary hermes or any non-default --daily-driver, this hard-coded PACK_TUI_COMMAND is still what install.sh:ensure_ssm_session_document uses to build Lowkey-Session-troika, so the documented SSM connect path runs openclaw tui instead of the selected driver. In the --primary hermes case deploy/bootstrap.sh:get_effective_deps substitutes the openclaw dependency away, so the session document points at a binary that was not installed; for claude-code, codex-cli, or none it bypasses the daily-driver selection entirely.

Useful? React with 👍 / 👎.

The hardcoded 'openclaw tui' broke --primary hermes (binary not
installed) and bypassed daily-driver selection for SSM sessions.

Troika's .bashrc autolaunch block handles the dynamic dispatch
(reads ~/.config/lowkey/daily-driver at runtime), so the SSM
session document just needs to start a login shell.

Addresses: PR #78 Codex review P2 suggestion.
@royosherove royosherove merged commit a5f2f67 into main Jul 13, 2026
17 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