Skip to content

Add CodeRabbit slash command helper#553

Merged
Wirasm merged 2 commits intomainfrom
coderabbit-slash-command
Sep 1, 2025
Merged

Add CodeRabbit slash command helper#553
Wirasm merged 2 commits intomainfrom
coderabbit-slash-command

Conversation

@Wirasm
Copy link
Copy Markdown
Collaborator

@Wirasm Wirasm commented Sep 1, 2025

Summary

  • Add .claude/commands/archon/archon-coderabbit-helper.md slash command for CodeRabbit integration
  • Add PRPs/completed/ to .gitignore to exclude completed PRPs from version control

What changed?

  • Created new slash command that helps generate CodeRabbit-compatible review summaries
  • Updated .gitignore to prevent tracking of completed PRP files

Test plan

  • Verify .claude/commands/archon/archon-coderabbit-helper.md slash command is available
  • Confirm PRPs/completed/ directory is ignored by git
  • Test slash command functionality in Claude Code

Notes

This adds a helper command for generating structured review summaries that work well with CodeRabbit's AI review system.

Summary by CodeRabbit

  • Documentation

    • Added a standardized Code Review Helper template to streamline review analysis, option generation (with pros/cons and effort), recommendations, and user feedback prompts.
  • Chores

    • Updated repository ignore rules to exclude completed planning artifacts, reducing noise and keeping the workspace clean.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 1, 2025

Walkthrough

Adds a new Archon CodeRabbit helper template Markdown file and updates .gitignore to ignore PRPs/completed/. No code or API changes.

Changes

Cohort / File(s) Summary
Archon CodeRabbit Helper Template
.claude/commands/archon/archon-coderabbit-helper.md
Adds a structured helper template with front-matter, review workflow, instructions, and a response format requiring 2–5 option analyses with pros/cons/effort and a recommendation.
Git Ignore Update
.gitignore
Adds ignore rule PRPs/completed/ positioned after PRPs/local and before /logs/.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump my paws on freshly written ground,
A helper hops in Archon’s tidy town.
Ignore the burrows marked “completed” neat,
Templates lined like rows of clover sweet.
With options, pros, and cons in tidy rows—
I nibble choices; the best one shows. 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch coderabbit-slash-command

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Wirasm Wirasm merged commit 230f825 into main Sep 1, 2025
7 of 8 checks passed
@Wirasm Wirasm deleted the coderabbit-slash-command branch September 1, 2025 15:19
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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.claude/commands/archon/archon-coderabbit-helper.md (1)

69-74: Fix incomplete bullet in “User feedback” section.

Last bullet ends mid-sentence; complete it so assistants know what to do.

 - If the user is ready to implement the recommended option right away
+ - If the user is ready to implement the recommended option right away,
+   provide a concise task list (bulleted), confirm ownership and timeline,
+   and offer to generate diffs or code snippets to start implementation.
🧹 Nitpick comments (2)
.gitignore (1)

6-6: Anchor the ignored directory to repo root for precision.

Use a leading slash to avoid accidental matches in nested paths.

-PRPs/completed/
+/PRPs/completed/

Consider similarly anchoring PRPs/local for consistency.

.claude/commands/archon/archon-coderabbit-helper.md (1)

34-47: Pin the output contract to reduce drift across assistants.

Explicitly require exact headings and no extra sections to keep summaries machine-consumable.

 ## Response Format
+
+Follow this schema exactly. Use these headings verbatim and do not add,
+rename, or reorder sections. Keep prose concise and avoid pre/post text.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f938a3d and 9ce4cb6.

📒 Files selected for processing (2)
  • .claude/commands/archon/archon-coderabbit-helper.md (1 hunks)
  • .gitignore (1 hunks)
🧰 Additional context used
🪛 LanguageTool
.claude/commands/archon/archon-coderabbit-helper.md

[style] ~15-~15: Consider a different adjective to strengthen your wording.
Context: ...ggestion following these steps: ### 1. Deep Analysis - Understand the technical is...

(DEEP_PROFOUND)


[grammar] ~18-~18: There might be a mistake here.
Context: ...g raised - Check if it's a real problem or false positive - Search the codebase fo...

(QB_NEW_EN)


[grammar] ~20-~20: There might be a mistake here.
Context: ...base for related patterns and context - Consider project phase (early beta) and architec...

(QB_NEW_EN)


[grammar] ~36-~36: There might be a mistake here.
Context: ...## Response Format ### 📋 Issue Summary _[One sentence describing what CodeRabbit...

(QB_NEW_EN)


[grammar] ~44-~44: There might be a mistake here.
Context: ...planation]_ ### 🎯 Priority for this PR [HIGH/MEDIUM/LOW/SKIP with reasoning] ...

(QB_NEW_EN)


[grammar] ~48-~48: There might be a mistake here.
Context: ... reasoning]_ ### 🔧 Options & Tradeoffs Option 1: [Name] - What: _[Brief desc...

(QB_NEW_EN)


[grammar] ~52-~52: There might be a mistake here.
Context: ...: [Name]** - What: [Brief description] - Pros: [Benefits] - Cons: [Drawbacks]...

(QB_NEW_EN)


[grammar] ~53-~53: There might be a mistake here.
Context: ...[Brief description]_ - Pros: [Benefits] - Cons: [Drawbacks] - Effort: _[Low/Medi...

(QB_NEW_EN)


[grammar] ~54-~54: There might be a mistake here.
Context: ... Pros: [Benefits] - Cons: [Drawbacks] - Effort: [Low/Medium/High] **Option 2:...

(QB_NEW_EN)


[grammar] ~59-~59: There might be a mistake here.
Context: ...: [Name]** - What: [Brief description] - Pros: [Benefits] - Cons: [Drawbacks]...

(QB_NEW_EN)


[grammar] ~60-~60: There might be a mistake here.
Context: ...[Brief description]_ - Pros: [Benefits] - Cons: [Drawbacks] - Effort: _[Low/Medi...

(QB_NEW_EN)


[grammar] ~61-~61: There might be a mistake here.
Context: ... Pros: [Benefits] - Cons: [Drawbacks] - Effort: [Low/Medium/High] ### 💡 Reco...

(QB_NEW_EN)


[grammar] ~64-~64: There might be a mistake here.
Context: ...Low/Medium/High]_ ### 💡 Recommendation _[Your recommended option with 1-2 senten...

(QB_NEW_EN)


[grammar] ~70-~70: There might be a mistake here.
Context: ...their feedback on the suggested changes. - Ask the user if they wish to discuss any...

(QB_NEW_EN)


[grammar] ~72-~72: There might be a mistake here.
Context: ...provide additional options or tradeoffs. - If the user is ready to implement the re...

(QB_NEW_EN)

POWERFULMOVES pushed a commit to POWERFULMOVES/PMOVES-Archon that referenced this pull request Feb 12, 2026
Bumps the pip group with 1 update in the /pmoves/docs/PMOVES.AI PLANS/Enhanced Media Stack with Advanced AudioVideo Analysis directory: [python-multipart](https://github.com/Kludex/python-multipart).


Updates `python-multipart` from 0.0.20 to 0.0.22
- [Release notes](https://github.com/Kludex/python-multipart/releases)
- [Changelog](https://github.com/Kludex/python-multipart/blob/master/CHANGELOG.md)
- [Commits](Kludex/python-multipart@0.0.20...0.0.22)

---
updated-dependencies:
- dependency-name: python-multipart
  dependency-version: 0.0.22
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
coleam00 added a commit that referenced this pull request Apr 7, 2026
* Fix: StepLogs always shows placeholder — wire events to lines prop (#550)

StepLogs rendered a permanent placeholder because WorkflowExecution.tsx
called <StepLogs> without a `lines` prop. The component had no data-fetching
logic of its own and defaulted lines to [].

The fix adds a useMemo in WorkflowExecution that extracts step lifecycle
events (step_started, step_completed, step_failed, parallel_agent_*,
loop_iteration_*, node_*) from the already-fetched queryData.events and
formats them as readable timestamped log lines. These are passed to
StepLogs via the lines prop.

Changes:
- Add useMemo import
- Add WorkflowEventResponse to WorkflowRunQueryData interface
- Store data.events in queryFn return value
- Add stepLogLines useMemo to compute formatted log lines for selected step
- Pass lines={stepLogLines} to StepLogs component

No new API calls — data.events was already fetched by the existing useQuery.

Fixes #550

* fix: address PR review issues — cancel error handling, NaN guards, URI encoding, error state

- Fix NaN elapsed time when startedAt is null (WorkflowProgressCard, LoopIterationView)
- URI-encode conversationId in API calls to handle special characters
- Detect Windows drive letter paths in Sidebar local path detection
- Add Navigate redirect for /workflows/runs to /workflows in App.tsx
- Export ITransportWriter interface from transport.ts for testability
- Decouple WorkflowList project selector from global ProjectContext (local state)
- Split server test script into separate bun test invocations to avoid mock pollution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: remove web. log event prefix from transport.ts to match test expectations

The PR removed web. prefix from persistence.ts log events but missed transport.ts.
The transport.test.ts assertions expect unprefixed event names (e.g. 'adapter_ready',
'sse_write_failed'), so align transport.ts to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf: throttle activity updates + memoize workflow dispatch hydration

- executor.ts: throttle updateWorkflowActivity to at most once per 10s per
  workflow run to reduce DB write pressure during long-running steps. Clean
  up the lastActivityUpdate map entry on run completion to prevent leaks.

- ChatInterface.tsx: memoize workflowDispatchIds as a joined string so the
  workflow-hydration useEffect only re-fires when a new dispatch is added,
  not on every streaming token. Prevents redundant getWorkflowRunByWorker
  calls during active streaming.

- ws-transport.ts: add WebSocketTransport class implementing ITransportWriter
  for bidirectional WebSocket communication with per-conversation buffering,
  stale connection replacement, and graceful shutdown.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(workflows): fix executor activity update test for 10s throttle

The activity-update-failure test was making rapid consecutive calls that
the new 10-second throttle would suppress. Add a Date.now spy that
advances by 11s per call so each message in the test bypasses the gate
and the warning threshold is still exercised correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: add ws-transport tests, buffer guard comment, and WorkflowList project init fix

- Add ws-transport.test.ts covering buffer overflow, connection, and message routing
- Add clarifying comment on the 200-conversation buffer guard in ws-transport.ts
- Add TODO comment on DAG node_* events not appearing in StepLogs (step_index=null)
- Fix WorkflowList to initialise localProjectId from selectedProjectId context

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(review): address code review findings in ws-transport tests and WorkflowList

- Split server test script so each adapter test file runs in its own
  bun test invocation — prevents mock.module('@archon/paths') collision
  between transport.test.ts, persistence.test.ts, and ws-transport.test.ts
- Replace 62-second real-timer test with synchronous clearTimeout spy:
  verifies the cleanup timer is cancelled on reconnection without blocking CI
- Add useEffect sync guard in WorkflowList: if the locally-selected project
  is removed from the global codebase list, fall back to selectedProjectId

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: remove WebSocket transport infrastructure

WebSocket transport was added as dead code (never wired up in routes
or index.ts). Per analysis in PR #528, SSE+REST is sufficient for our
single-developer tool — WebSocket adds complexity without user-visible
benefit.

Removed:
- ws-transport.ts and ws-transport.test.ts (496 lines)
- WebAdapter WS methods (registerWebSocket, removeWebSocket, handleWebSocketMessage, setWebSocketTransport)
- Dual-emit to wsTransport in all WebAdapter methods
- ITransportWriter interface (only needed for WS abstraction)
- ws-transport test invocation from server package.json

Kept all legitimate changes from this PR:
- StepLogs fix, NaN guards, URI encoding, executor throttle, etc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
coleam00 added a commit that referenced this pull request Apr 7, 2026
Add missing lastActivityUpdate.delete() calls in 3 executor exit paths
where the module-level Map entry was not being cleaned up:

1. Between-step cancellation (cancel_detected)
2. Parallel block failure
3. Sequential step failure

Without these, cancelled or failed workflow run IDs accumulate in the
Map forever — a slow memory leak in long-running server processes.

The success and finally-block cleanup paths already had this call;
these 3 early-return error paths were missed when the throttle was
introduced in PR #553.

Closes #548

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Tyone88 pushed a commit to Tyone88/Archon that referenced this pull request Apr 16, 2026
… (coleam00#553)

* Fix: StepLogs always shows placeholder — wire events to lines prop (coleam00#550)

StepLogs rendered a permanent placeholder because WorkflowExecution.tsx
called <StepLogs> without a `lines` prop. The component had no data-fetching
logic of its own and defaulted lines to [].

The fix adds a useMemo in WorkflowExecution that extracts step lifecycle
events (step_started, step_completed, step_failed, parallel_agent_*,
loop_iteration_*, node_*) from the already-fetched queryData.events and
formats them as readable timestamped log lines. These are passed to
StepLogs via the lines prop.

Changes:
- Add useMemo import
- Add WorkflowEventResponse to WorkflowRunQueryData interface
- Store data.events in queryFn return value
- Add stepLogLines useMemo to compute formatted log lines for selected step
- Pass lines={stepLogLines} to StepLogs component

No new API calls — data.events was already fetched by the existing useQuery.

Fixes coleam00#550

* fix: address PR review issues — cancel error handling, NaN guards, URI encoding, error state

- Fix NaN elapsed time when startedAt is null (WorkflowProgressCard, LoopIterationView)
- URI-encode conversationId in API calls to handle special characters
- Detect Windows drive letter paths in Sidebar local path detection
- Add Navigate redirect for /workflows/runs to /workflows in App.tsx
- Export ITransportWriter interface from transport.ts for testability
- Decouple WorkflowList project selector from global ProjectContext (local state)
- Split server test script into separate bun test invocations to avoid mock pollution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: remove web. log event prefix from transport.ts to match test expectations

The PR removed web. prefix from persistence.ts log events but missed transport.ts.
The transport.test.ts assertions expect unprefixed event names (e.g. 'adapter_ready',
'sse_write_failed'), so align transport.ts to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf: throttle activity updates + memoize workflow dispatch hydration

- executor.ts: throttle updateWorkflowActivity to at most once per 10s per
  workflow run to reduce DB write pressure during long-running steps. Clean
  up the lastActivityUpdate map entry on run completion to prevent leaks.

- ChatInterface.tsx: memoize workflowDispatchIds as a joined string so the
  workflow-hydration useEffect only re-fires when a new dispatch is added,
  not on every streaming token. Prevents redundant getWorkflowRunByWorker
  calls during active streaming.

- ws-transport.ts: add WebSocketTransport class implementing ITransportWriter
  for bidirectional WebSocket communication with per-conversation buffering,
  stale connection replacement, and graceful shutdown.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(workflows): fix executor activity update test for 10s throttle

The activity-update-failure test was making rapid consecutive calls that
the new 10-second throttle would suppress. Add a Date.now spy that
advances by 11s per call so each message in the test bypasses the gate
and the warning threshold is still exercised correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: add ws-transport tests, buffer guard comment, and WorkflowList project init fix

- Add ws-transport.test.ts covering buffer overflow, connection, and message routing
- Add clarifying comment on the 200-conversation buffer guard in ws-transport.ts
- Add TODO comment on DAG node_* events not appearing in StepLogs (step_index=null)
- Fix WorkflowList to initialise localProjectId from selectedProjectId context

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(review): address code review findings in ws-transport tests and WorkflowList

- Split server test script so each adapter test file runs in its own
  bun test invocation — prevents mock.module('@archon/paths') collision
  between transport.test.ts, persistence.test.ts, and ws-transport.test.ts
- Replace 62-second real-timer test with synchronous clearTimeout spy:
  verifies the cleanup timer is cancelled on reconnection without blocking CI
- Add useEffect sync guard in WorkflowList: if the locally-selected project
  is removed from the global codebase list, fall back to selectedProjectId

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: remove WebSocket transport infrastructure

WebSocket transport was added as dead code (never wired up in routes
or index.ts). Per analysis in PR coleam00#528, SSE+REST is sufficient for our
single-developer tool — WebSocket adds complexity without user-visible
benefit.

Removed:
- ws-transport.ts and ws-transport.test.ts (496 lines)
- WebAdapter WS methods (registerWebSocket, removeWebSocket, handleWebSocketMessage, setWebSocketTransport)
- Dual-emit to wsTransport in all WebAdapter methods
- ITransportWriter interface (only needed for WS abstraction)
- ws-transport test invocation from server package.json

Kept all legitimate changes from this PR:
- StepLogs fix, NaN guards, URI encoding, executor throttle, etc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Tyone88 pushed a commit to Tyone88/Archon that referenced this pull request Apr 16, 2026
…leam00#557)

Add missing lastActivityUpdate.delete() calls in 3 executor exit paths
where the module-level Map entry was not being cleaned up:

1. Between-step cancellation (cancel_detected)
2. Parallel block failure
3. Sequential step failure

Without these, cancelled or failed workflow run IDs accumulate in the
Map forever — a slow memory leak in long-running server processes.

The success and finally-block cleanup paths already had this call;
these 3 early-return error paths were missed when the throttle was
introduced in PR coleam00#553.

Closes coleam00#548

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
joaobmonteiro pushed a commit to joaobmonteiro/Archon that referenced this pull request Apr 26, 2026
… (coleam00#553)

* Fix: StepLogs always shows placeholder — wire events to lines prop (coleam00#550)

StepLogs rendered a permanent placeholder because WorkflowExecution.tsx
called <StepLogs> without a `lines` prop. The component had no data-fetching
logic of its own and defaulted lines to [].

The fix adds a useMemo in WorkflowExecution that extracts step lifecycle
events (step_started, step_completed, step_failed, parallel_agent_*,
loop_iteration_*, node_*) from the already-fetched queryData.events and
formats them as readable timestamped log lines. These are passed to
StepLogs via the lines prop.

Changes:
- Add useMemo import
- Add WorkflowEventResponse to WorkflowRunQueryData interface
- Store data.events in queryFn return value
- Add stepLogLines useMemo to compute formatted log lines for selected step
- Pass lines={stepLogLines} to StepLogs component

No new API calls — data.events was already fetched by the existing useQuery.

Fixes coleam00#550

* fix: address PR review issues — cancel error handling, NaN guards, URI encoding, error state

- Fix NaN elapsed time when startedAt is null (WorkflowProgressCard, LoopIterationView)
- URI-encode conversationId in API calls to handle special characters
- Detect Windows drive letter paths in Sidebar local path detection
- Add Navigate redirect for /workflows/runs to /workflows in App.tsx
- Export ITransportWriter interface from transport.ts for testability
- Decouple WorkflowList project selector from global ProjectContext (local state)
- Split server test script into separate bun test invocations to avoid mock pollution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: remove web. log event prefix from transport.ts to match test expectations

The PR removed web. prefix from persistence.ts log events but missed transport.ts.
The transport.test.ts assertions expect unprefixed event names (e.g. 'adapter_ready',
'sse_write_failed'), so align transport.ts to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* perf: throttle activity updates + memoize workflow dispatch hydration

- executor.ts: throttle updateWorkflowActivity to at most once per 10s per
  workflow run to reduce DB write pressure during long-running steps. Clean
  up the lastActivityUpdate map entry on run completion to prevent leaks.

- ChatInterface.tsx: memoize workflowDispatchIds as a joined string so the
  workflow-hydration useEffect only re-fires when a new dispatch is added,
  not on every streaming token. Prevents redundant getWorkflowRunByWorker
  calls during active streaming.

- ws-transport.ts: add WebSocketTransport class implementing ITransportWriter
  for bidirectional WebSocket communication with per-conversation buffering,
  stale connection replacement, and graceful shutdown.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(workflows): fix executor activity update test for 10s throttle

The activity-update-failure test was making rapid consecutive calls that
the new 10-second throttle would suppress. Add a Date.now spy that
advances by 11s per call so each message in the test bypasses the gate
and the warning threshold is still exercised correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: add ws-transport tests, buffer guard comment, and WorkflowList project init fix

- Add ws-transport.test.ts covering buffer overflow, connection, and message routing
- Add clarifying comment on the 200-conversation buffer guard in ws-transport.ts
- Add TODO comment on DAG node_* events not appearing in StepLogs (step_index=null)
- Fix WorkflowList to initialise localProjectId from selectedProjectId context

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(review): address code review findings in ws-transport tests and WorkflowList

- Split server test script so each adapter test file runs in its own
  bun test invocation — prevents mock.module('@archon/paths') collision
  between transport.test.ts, persistence.test.ts, and ws-transport.test.ts
- Replace 62-second real-timer test with synchronous clearTimeout spy:
  verifies the cleanup timer is cancelled on reconnection without blocking CI
- Add useEffect sync guard in WorkflowList: if the locally-selected project
  is removed from the global codebase list, fall back to selectedProjectId

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: remove WebSocket transport infrastructure

WebSocket transport was added as dead code (never wired up in routes
or index.ts). Per analysis in PR coleam00#528, SSE+REST is sufficient for our
single-developer tool — WebSocket adds complexity without user-visible
benefit.

Removed:
- ws-transport.ts and ws-transport.test.ts (496 lines)
- WebAdapter WS methods (registerWebSocket, removeWebSocket, handleWebSocketMessage, setWebSocketTransport)
- Dual-emit to wsTransport in all WebAdapter methods
- ITransportWriter interface (only needed for WS abstraction)
- ws-transport test invocation from server package.json

Kept all legitimate changes from this PR:
- StepLogs fix, NaN guards, URI encoding, executor throttle, etc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
joaobmonteiro pushed a commit to joaobmonteiro/Archon that referenced this pull request Apr 26, 2026
…leam00#557)

Add missing lastActivityUpdate.delete() calls in 3 executor exit paths
where the module-level Map entry was not being cleaned up:

1. Between-step cancellation (cancel_detected)
2. Parallel block failure
3. Sequential step failure

Without these, cancelled or failed workflow run IDs accumulate in the
Map forever — a slow memory leak in long-running server processes.

The success and finally-block cleanup paths already had this call;
these 3 early-return error paths were missed when the throttle was
introduced in PR coleam00#553.

Closes coleam00#548

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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