Skip to content

fix(467): rollcall path + INTERNAL_HOST env doc + validator after workspace plugins#474

Merged
mabry1985 merged 1 commit intodevfrom
chore/ship-cleanup-467-472
Apr 22, 2026
Merged

fix(467): rollcall path + INTERNAL_HOST env doc + validator after workspace plugins#474
mabry1985 merged 1 commit intodevfrom
chore/ship-cleanup-467-472

Conversation

@mabry1985
Copy link
Copy Markdown

@mabry1985 mabry1985 commented Apr 22, 2026

Closes the three remaining open CodeRabbit findings from #466's review on the v0.7.22 promotion. Items #2 (ttlMs Number.isFinite) and #4 (gate pr-remediator-skill-executor on GitHub creds) already shipped via #470 and 9792b0c.

Findings cleared in this PR

#1.claude/commands/rollcall.md hard-coded path (🔴 per CodeRabbit)

Replaced /home/josh/dev/protoWorkstacean/scripts/agent-rollcall.sh with the relative scripts/agent-rollcall.sh and explicit "from the repo root" instruction. Works for any operator's clone.

#3 — README env table missing WORKSTACEAN_INTERNAL_HOST (🟡)

Added a dedicated row that cross-references WORKSTACEAN_PUBLIC_BASE_URL. Anyone running outside the default docker network now finds the override directly.

#5 — startup wiring validator load-order + reload coverage (🟠)

Two real gaps:

  • Validator ran BEFORE loadWorkspacePlugins(), so executor registrars shipped as workspace plugins were falsely flagged in strict mode.
  • Validator only ran once at startup, so new actions.yaml entries loaded via TOPICS.CONFIG_RELOAD bypassed the fail-loud guard until next restart.

Fix:

  • Extracted runWiringValidator(reason: "startup" | "reload") helper.
  • Initial call moved AFTER all plugin loading (core + registered + workspace).
  • Re-run added inside the CONFIG_RELOAD subscriber after loadActionsYaml().
  • New [reload-validator] log tag distinguishes the call sites.

What's NOT in this PR

Test plan

  • bun test — 1054/1054 pass
  • Type check clean
  • On :dev: confirm [startup-validator] line still emits at boot
  • On :dev: trigger a config.reload and verify [reload-validator] log line appears

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated environment variable documentation for A2A agent-card URL fallback behavior when WORKSTACEAN_PUBLIC_BASE_URL is unset.
    • Added documentation for the WORKSTACEAN_INTERNAL_HOST environment variable.
  • Improvements

    • Enhanced action wiring validation to run on configuration reload in addition to startup.

Closes the three open CodeRabbit findings from #466 not yet shipped
(items #2 and #4 already landed via #470 and 9792b0c).

#467 finding #1 (.claude/commands/rollcall.md):
  Hard-coded operator path /home/josh/dev/... → relative path
  scripts/agent-rollcall.sh with explicit "from repo root" guidance.
  Works for any clone; matches every other repo-script reference.

#467 finding #3 (README.md env table):
  Add a dedicated env-table row for WORKSTACEAN_INTERNAL_HOST so it's
  discoverable by anyone overriding the docker-network default.
  Cross-references WORKSTACEAN_PUBLIC_BASE_URL.

#467 finding #5 (src/index.ts startup-validator):
  validateActionExecutors() ran BEFORE loadWorkspacePlugins(), so
  executor registrars shipped as workspace plugins were falsely flagged
  in strict mode. It also ran only once at startup, so config.reload of
  actions.yaml bypassed the fail-loud guard.

  Fix: extract a runWiringValidator(reason) helper, call it AFTER all
  plugin loading (core + registered + workspace), and re-run inside the
  CONFIG_RELOAD subscriber after loadActionsYaml(). New "[reload-validator]"
  log tag distinguishes the call sites.

Tests: 1054/1054 pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

📝 Walkthrough

Walkthrough

This PR fixes a script execution path to use relative paths, updates environment variable documentation for URL fallback behavior and the internal hostname, and refactors wiring validation to execute both at startup (after plugin loading) and during config reloads.

Changes

Cohort / File(s) Summary
Documentation & Configuration
.claude/commands/rollcall.md, README.md
Fixed script path from absolute to relative reference and clarified environment variable documentation for fallback URL behavior, including new WORKSTACEAN_INTERNAL_HOST variable definition.
Core Validation Refactoring
src/index.ts
Extracted wiring validation into a runWiringValidator helper function that dynamically imports the validator once and runs on both startup (after plugin loading) and config reload, replacing the original startup-only validation block.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Poem

🐰 A rabbit hops through startup's door,
Validates the paths once more,
When config changes, checks anew—
All wires checked! The right thing to do!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly summarizes all three main changes: rollcall path fix, INTERNAL_HOST env documentation, and validator repositioning after workspace plugins.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ship-cleanup-467-472

Comment @coderabbitai help to get the list of available commands and usage tips.

@mabry1985 mabry1985 enabled auto-merge April 22, 2026 04:27
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/index.ts`:
- Around line 575-582: The reload validator is mislabeling reload-time failures
as startup because validateActionExecutors currently hard-codes the log tag and
agentId; update the call site in runWiringValidator to pass explicit options
(e.g., logTag and agentId) when invoking validateActionExecutors for "reload" so
the logs show "[reload-validator]" and agentId "reload-validator", and modify
validateActionExecutors to accept and use those new options (e.g., logTag and
agentId) instead of the current hard-coded values in its logging and
unwired-reporting logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9e1aa2e2-d973-4555-993a-d0adf07c40be

📥 Commits

Reviewing files that changed from the base of the PR and between 5ce9d89 and 27b3bb4.

📒 Files selected for processing (3)
  • .claude/commands/rollcall.md
  • README.md
  • src/index.ts

Comment thread src/index.ts
Comment on lines +575 to +582
const unwired = validateActionExecutors(actionRegistry, executorRegistry, {
bus,
throwOnUnwired: process.env.WORKSTACEAN_STRICT_WIRING === "1",
});
if (unwired.length === 0) {
const tag = reason === "startup" ? "[startup-validator]" : "[reload-validator]";
console.log(`${tag} All ${actionRegistry.size} action(s) have a registered executor.`);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Reload failures still log as startup validator.

On Line 575, runWiringValidator("reload") still delegates to validateActionExecutors, which currently hard-codes [startup-validator] logs and agentId: "startup-validator" for unwired actions (src/planner/validate-action-executors.ts:104-154). This makes reload-time failures look like startup failures in ops alerts.

Suggested fix
-const { validateActionExecutors } = await import("./planner/validate-action-executors.js");
+const { validateActionExecutors } = await import("./planner/validate-action-executors.js");
 function runWiringValidator(reason: "startup" | "reload"): void {
+  const tag = reason === "startup" ? "[startup-validator]" : "[reload-validator]";
   const unwired = validateActionExecutors(actionRegistry, executorRegistry, {
     bus,
     throwOnUnwired: process.env.WORKSTACEAN_STRICT_WIRING === "1",
+    logTag: tag,
+    agentId: reason === "startup" ? "startup-validator" : "reload-validator",
   });
   if (unwired.length === 0) {
-    const tag = reason === "startup" ? "[startup-validator]" : "[reload-validator]";
     console.log(`${tag} All ${actionRegistry.size} action(s) have a registered executor.`);
   }
 }

(Companion change needed in src/planner/validate-action-executors.ts to accept/use logTag and agentId options.)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/index.ts` around lines 575 - 582, The reload validator is mislabeling
reload-time failures as startup because validateActionExecutors currently
hard-codes the log tag and agentId; update the call site in runWiringValidator
to pass explicit options (e.g., logTag and agentId) when invoking
validateActionExecutors for "reload" so the logs show "[reload-validator]" and
agentId "reload-validator", and modify validateActionExecutors to accept and use
those new options (e.g., logTag and agentId) instead of the current hard-coded
values in its logging and unwired-reporting logic.

@mabry1985 mabry1985 merged commit df0890a into dev Apr 22, 2026
4 checks passed
@mabry1985 mabry1985 deleted the chore/ship-cleanup-467-472 branch April 22, 2026 04:31
mabry1985 pushed a commit that referenced this pull request Apr 22, 2026
…s-strategy back-merge

The prior back-merge of main → dev (#468) was force-squashed when CodeRabbit
froze, dropping main as an ancestor of dev. This back-merge re-establishes
that ancestry, but the ort/ours strategy preserved main's pre-#474 validator
block alongside dev's new runWiringValidator() helper — both were present.

Drop the older duplicate so dev's #474 layout stands: validator runs once,
AFTER loadWorkspacePlugins(), and re-runs on config.reload.

Tests: 1059/1059 pass.
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