Skip to content

chore: prune unused root dependencies#948

Open
willwashburn wants to merge 4 commits into
mainfrom
codex/package-dependency-cleanup
Open

chore: prune unused root dependencies#948
willwashburn wants to merge 4 commits into
mainfrom
codex/package-dependency-cleanup

Conversation

@willwashburn
Copy link
Copy Markdown
Member

Summary

  • Remove root dependencies/devDependencies confirmed unused by root imports or scripts, while leaving workspace-owned dependencies declared in their packages.
  • Add missing root dependency on @agent-relay/memory for the public root export.
  • Regenerate package-lock.json and update the syncpack script to the v14 command.

Confirmation

  • Exhaustive literal and import-like searches covered src, packages, scripts, tests, test, web, plugins, .github, workflows, and crates, excluding generated install/build output.
  • Removed packages either had no import-like references or were imported only by workspace packages that already declare them.
  • Kept agent-trajectories because root postinstall patches it, and kept Relaycast/Relayfile packages that are directly imported by the root CLI.

Validation

  • npm run typecheck
  • npm run pack:validate
  • node -e "await import('./dist/src/index.js'); await import('./dist/src/cli/index.js')"
  • npm test
  • npm run audit:deps
  • npm run knip still reports pre-existing config/noise, but none of the removed root packages remain in its unused root dependency list.
  • npm run syncpack now reaches syncpack lint and reports pre-existing workspace version drift.

@willwashburn willwashburn requested a review from khaliqgant as a code owner May 22, 2026 16:13
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1dace626-671b-4734-86ef-a3c11797a56a

📥 Commits

Reviewing files that changed from the base of the PR and between bf9427d and 2b36381.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • .github/workflows/package-validation.yml
  • .trajectories/completed/2026-05/traj_mytnzgfayj3d.json
  • .trajectories/completed/2026-05/traj_mytnzgfayj3d.md
  • .trajectories/completed/2026-05/traj_vfa1jr6otnjn.json
  • .trajectories/completed/2026-05/traj_vfa1jr6otnjn.md
  • .trajectories/index.json
  • package.json
✅ Files skipped from review due to trivial changes (4)
  • .trajectories/completed/2026-05/traj_mytnzgfayj3d.json
  • .trajectories/completed/2026-05/traj_vfa1jr6otnjn.md
  • .trajectories/completed/2026-05/traj_mytnzgfayj3d.md
  • .trajectories/completed/2026-05/traj_vfa1jr6otnjn.json

📝 Walkthrough

Walkthrough

Replace root dependency set by adding @agent-relay/memory (v7.1.0), update the syncpack script to syncpack lint, move npm tarball validation after CLI smoke tests in CI, and add many completed trajectory JSON/MD records plus a rebuilt .trajectories/index.json.

Changes

Dependency Cleanup and Validation

Layer / File(s) Summary
Root dependency swap and tooling update
package.json
Add @agent-relay/memory (v7.1.0), remove several unused dependencies, and change the syncpack npm script to syncpack lint.
Completion trajectory recording, index rebuild, and workflow tweak
.trajectories/completed/*, .trajectories/index.json, .github/workflows/package-validation.yml
Add multiple completed trajectory JSON and markdown records (dependency cleanup, PR refreshes, telemetry fix, merge resolution), update trajectory index lastUpdated and insert many new entries, apply small doc/terminator edits to existing trajectory files, and move npm run pack:validate to after CLI broker lifecycle smoke tests in the validate workflow.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • khaliqgant

Poem

🐰 I hopped through package trees today,
Pruned the vines that got in the way,
Memory joined the tidy pack,
Trajectories logged our little track,
Syncpack lints — then I hopped away.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the primary change: removing unused root package dependencies, which is the core objective of this PR.
Description check ✅ Passed The PR description comprehensively covers the template sections with specific implementation details, confirmation methodology, and validation steps performed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/package-dependency-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

Re-trigger cubic

…ncy-cleanup

# Conflicts:
#	.trajectories/index.json
#	package-lock.json
Copy link
Copy Markdown
Contributor

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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.trajectories/completed/2026-05/traj_78ytpicts778.md:
- Line 12: Replace the ambiguous wildcard-style token notation
"AGENT*RELAY_RESULT*_" with the clear underscore-based form
"AGENT_RELAY_RESULT*_" everywhere in the narrative and config mentions
(Gemini/Droid mcp add, opencode.json, .cursor/mcp.json and the inline Codex
result env references), ensuring all occurrences use the exact environment
variable name and consistent formatting; leave the note about skipping the
skip*relay_prompt finding as-is but update its description to reference
AGENT_RELAY_RESULT*_ consistently as well.

In @.trajectories/index.json:
- Line 311: The index contains host-specific absolute "path" values (e.g.
"/Users/will/Projects/AgentWorkforce/relay/.trajectories/completed/2026-05/traj_1rrpe2r7fyem.json")
which must be normalized to repo-relative paths; update the "path" value for
that entry and the other listed entries (332, 550, 606, 719, 1014, 1154, 1161,
1168, 1175, 1182, 1189) to use stable repo-relative strings like
".trajectories/completed/2026-05/traj_1rrpe2r7fyem.json" so the index no longer
contains local filesystem details.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e309f0b-b7f3-43d7-a812-df68375eef4f

📥 Commits

Reviewing files that changed from the base of the PR and between dc6cad5 and bf9427d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • .trajectories/completed/2026-05/traj_5k0jtc1g5l33.md
  • .trajectories/completed/2026-05/traj_78ytpicts778.json
  • .trajectories/completed/2026-05/traj_78ytpicts778.md
  • .trajectories/completed/2026-05/traj_90jmd9z27oap.json
  • .trajectories/completed/2026-05/traj_90jmd9z27oap.md
  • .trajectories/index.json
  • package.json
💤 Files with no reviewable changes (1)
  • package.json
✅ Files skipped from review due to trivial changes (4)
  • .trajectories/completed/2026-05/traj_90jmd9z27oap.md
  • .trajectories/completed/2026-05/traj_78ytpicts778.json
  • .trajectories/completed/2026-05/traj_90jmd9z27oap.json
  • .trajectories/completed/2026-05/traj_5k0jtc1g5l33.md

## Summary

Verified PR 932 review findings. Fixed the valid shared-config token persistence issue by omitting AGENT_RELAY_RESULT_* from Gemini/Droid mcp add, opencode.json, and .cursor/mcp.json while retaining inline Codex result env. Skipped the skip_relay_prompt finding because current worker spawn already sets AGENT_RELAY_RESULT_* on the worker process even when MCP prompt injection is skipped.
Verified PR 932 review findings. Fixed the valid shared-config token persistence issue by omitting AGENT*RELAY_RESULT*_ from Gemini/Droid mcp add, opencode.json, and .cursor/mcp.json while retaining inline Codex result env. Skipped the skip*relay_prompt finding because current worker spawn already sets AGENT_RELAY_RESULT*_ on the worker process even when MCP prompt injection is skipped.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix malformed token notation in narrative text.

The current AGENT*RELAY_RESULT*_ / AGENT_RELAY_RESULT*_ formatting is ambiguous in Markdown and can miscommunicate the exact token/env var name.

Suggested text cleanup
-Verified PR 932 review findings. Fixed the valid shared-config token persistence issue by omitting AGENT*RELAY_RESULT*_ from Gemini/Droid mcp add, opencode.json, and .cursor/mcp.json while retaining inline Codex result env. Skipped the skip*relay_prompt finding because current worker spawn already sets AGENT_RELAY_RESULT*_ on the worker process even when MCP prompt injection is skipped.
+Verified PR 932 review findings. Fixed the valid shared-config token persistence issue by omitting `AGENT_RELAY_RESULT` from Gemini/Droid mcp add, opencode.json, and .cursor/mcp.json while retaining inline Codex result env. Skipped the `skip_relay_prompt` finding because current worker spawn already sets `AGENT_RELAY_RESULT` on the worker process even when MCP prompt injection is skipped.
-- **Reasoning:** The result callback token is per spawn. Gemini/Droid mcp add, opencode.json, and .cursor/mcp.json are shared or persistent surfaces, so those paths now omit AGENT*RELAY_RESULT*\* and rely on inline configs or worker process env instead.
+- **Reasoning:** The result callback token is per spawn. Gemini/Droid mcp add, opencode.json, and .cursor/mcp.json are shared or persistent surfaces, so those paths now omit `AGENT_RELAY_RESULT` and rely on inline configs or worker process env instead.

Also applies to: 23-23

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 12-12: Spaces inside emphasis markers

(MD037, no-space-in-emphasis)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.trajectories/completed/2026-05/traj_78ytpicts778.md at line 12, Replace the
ambiguous wildcard-style token notation "AGENT*RELAY_RESULT*_" with the clear
underscore-based form "AGENT_RELAY_RESULT*_" everywhere in the narrative and
config mentions (Gemini/Droid mcp add, opencode.json, .cursor/mcp.json and the
inline Codex result env references), ensuring all occurrences use the exact
environment variable name and consistent formatting; leave the note about
skipping the skip*relay_prompt finding as-is but update its description to
reference AGENT_RELAY_RESULT*_ consistently as well.

Comment thread .trajectories/index.json Outdated
"status": "completed",
"startedAt": "2026-05-20T07:20:33.009Z",
"completedAt": "2026-05-20T07:26:17.567Z",
"path": "/Users/will/Projects/AgentWorkforce/relay/.trajectories/completed/2026-05/traj_1rrpe2r7fyem.json"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Normalize trajectory path values to repo-relative paths.

Several newly added entries store host-specific absolute paths (/Users/..., /home/runner/..., /private/tmp/...). Since this index is shared and read as source-of-truth, these paths are non-portable and leak local filesystem details.

Use stable repo-relative paths (for example: .trajectories/completed/2026-05/<id>.json) for all newly added entries.

Also applies to: 332-332, 550-550, 606-606, 719-719, 1014-1014, 1154-1154, 1161-1161, 1168-1168, 1175-1175, 1182-1182, 1189-1189

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.trajectories/index.json at line 311, The index contains host-specific
absolute "path" values (e.g.
"/Users/will/Projects/AgentWorkforce/relay/.trajectories/completed/2026-05/traj_1rrpe2r7fyem.json")
which must be normalized to repo-relative paths; update the "path" value for
that entry and the other listed entries (332, 550, 606, 719, 1014, 1154, 1161,
1168, 1175, 1182, 1189) to use stable repo-relative strings like
".trajectories/completed/2026-05/traj_1rrpe2r7fyem.json" so the index no longer
contains local filesystem details.

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