Skip to content

fix: clarify Cerebro constants, fix Spanish heading, remove circular spec ref, explicit ceiling, improve shell docs#509

Merged
yacosta738 merged 3 commits into
mainfrom
copilot/fix-tools-constant-listing
Apr 11, 2026
Merged

fix: clarify Cerebro constants, fix Spanish heading, remove circular spec ref, explicit ceiling, improve shell docs#509
yacosta738 merged 3 commits into
mainfrom
copilot/fix-tools-constant-listing

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

Fixes several documentation clarity and spec correctness issues across four files: ambiguous constant relationships in normalize.rs, a mistranslated section heading, a circular spec cross-reference, an implicit ceiling value, and under-documented shell functions.

Changes

clients/agent-runtime/src/tools/mcp/normalize.rs

  • Added comments to CEREBRO_GATEWAY_ALLOWLIST (superset for routing/classification) and CEREBRO_PLANNED_TOOLS (planned-only subset), explicitly noting mem_context is excluded from the planned list because it is considered available

clients/web/apps/docs/src/content/docs/es/guides/release.md

  • Diagnósticos que debes revisarDiagnósticos a revisar durante un Release to match the objective tone and specificity of the English heading

openspec/specs/runtime-image-pipeline/spec.md

  • Removed (see REQ-8) from the max_image_bytes validation paragraph — REQ-8 does not contain these rules, making the reference circular/misleading
  • within the supported ceilingless than or equal to 8 for max_images_per_turn — eliminates the need for cross-spec lookup

scripts/check-tools.sh

  • Replaced the minimal comment on print_status with a full structured docstring (parameters + return values)
  • Added an explanatory comment to numeric_prefix
  • Extracted duplicated major/minor version comparison logic (Node.js, pnpm, Rust) into two reusable helpers with docstrings:
check_required_major_version "Node.js" "${node_full#v}" "$MIN_NODE"
check_required_major_minor_version "Rust" "$rust_full" "$MIN_RUST_MAJOR" "$MIN_RUST_MINOR"

Related Issues


Summary

Multiple small clarity and correctness fixes: constant relationship documentation in the Rust MCP normalize module, a Spanish translation tone mismatch, two spec ambiguities (circular reference and implicit ceiling value), and improved shell function documentation with extracted reusable helpers.


Tested Information

  • Rust tests for tools::mcp::normalize pass with no changes to test logic
  • bash -n syntax check confirms check-tools.sh is valid

Documentation Impact

  • Docs updated in:
    • clients/web/apps/docs/src/content/docs/es/guides/release.md
    • openspec/specs/runtime-image-pipeline/spec.md
  • Code comments updated in clients/agent-runtime/src/tools/mcp/normalize.rs and scripts/check-tools.sh
  • I verified the documentation matches the current behavior.

Breaking Changes

None.


Checklist

  • I have checked that there isn't already a PR solving the same problem.
  • I have read the Contributing Guidelines.
  • I ensured my code follows the project's style guidelines.
  • I have added or updated tests that prove my fix is effective or that my feature works.
  • I have updated the documentation, or I explained above why no documentation update is needed.
  • I verified the documentation matches the current behavior.
  • I have documented any breaking changes in the Breaking Changes section.
  • I have linked the related issue (if any).
Original prompt
Please apply the following diffs and create a pull request.
Once the PR is ready, give it a title based on the messages of the fixes being applied.

[{"message":"The constant `CEREBRO_PLANNED_TOOLS` lists 4 tools that are marked as planned/not-yet-implemented, but according to the archive report (verify-report.md line 41), `mem_context` was removed from this list and is now considered available. Consider adding a comment explaining the criteria for a tool being in this list versus `CEREBRO_GATEWAY_ALLOWLIST`, as the relationship between these two constants is not immediately obvious.","fixFiles":[{"filePath":"clients/agent-runtime/src/tools/mcp/normalize.rs","diff":"diff --git a/clients/agent-runtime/src/tools/mcp/normalize.rs b/clients/agent-runtime/src/tools/mcp/normalize.rs\n--- a/clients/agent-runtime/src/tools/mcp/normalize.rs\n+++ b/clients/agent-runtime/src/tools/mcp/normalize.rs\n@@ -14,6 +14,8 @@\n pub const CEREBRO_TOOL_SESSION_SUMMARY: &str = \"mem_session_summary\";\n pub const CEREBRO_TOOL_CONTEXT: &str = \"mem_context\";\n \n+// Tools recognized by the Cerebro gateway.\n+// This is the superset used for tool-name classification/routing.\n pub const CEREBRO_GATEWAY_ALLOWLIST: [&str; 12] = [\n     CEREBRO_TOOL_RECALL,\n     CEREBRO_TOOL_GET_OBSERVATION,\n@@ -29,6 +31,9 @@\n     CEREBRO_TOOL_SAVE_PROMPT,\n ];\n \n+// Subset of `CEREBRO_GATEWAY_ALLOWLIST` that is intentionally planned/not-yet-implemented.\n+// Keep only tools here that should be recognized but treated as planned.\n+// `mem_context` is intentionally excluded because it is considered available.\n pub const CEREBRO_PLANNED_TOOLS: [&str; 4] = [\n     CEREBRO_TOOL_SAVE_PROMPT,\n     CEREBRO_TOOL_SESSION_START,\n"}]},{"message":"The Spanish translation section title 'Diagnósticos que debes revisar' translates to 'Diagnostics you should review', which differs in tone from the English 'Diagnostics to Check During a Release'. Consider 'Diagnósticos a revisar durante un Release' for consistency with the English version's objective tone and specificity.","fixFiles":[{"filePath":"clients/web/apps/docs/src/content/docs/es/guides/release.md","diff":"diff --git a/clients/web/apps/docs/src/content/docs/es/guides/release.md b/clients/web/apps/docs/src/content/docs/es/guides/release.md\n--- a/clients/web/apps/docs/src/content/docs/es/guides/release.md\n+++ b/clients/web/apps/docs/src/content/docs/es/guides/release.md\n@@ -85,7 +85,7 @@\n - No crea GitHub Release.\n - No publica notas de release estables.\n \n-## Diagnósticos que debes revisar\n+## Diagnósticos a revisar durante un Release\n \n ### `release-please.yml`\n \n"}]},{"message":"The validation rules for `max_image_bytes` are documented in REQ-4 but reference REQ-8 for the full details. However, REQ-8 does not contain these specific validation rules for `max_image_bytes` - it only covers the field definition and other validation rules. This creates a circular or incomplete reference that could confuse implementers.","fixFiles":[{"filePath":"openspec/specs/runtime-image-pipeline/spec.md","diff":"diff --git a/openspec/specs/runtime-image-pipeline/spec.md b/openspec/specs/runtime-image-pipeline/spec.md\n--- a/openspec/specs/runtime-image-pipeline/spec.md\n+++ b/openspec/specs/runtime-image-pipeline/spec.md\n@@ -201,7 +201,7 @@\n admit turns with image counts less than or equal to the effective limit and MUST reject turns above\n that limit without partially dispatching any subset of their staged images.\n \n-Config validation for `max_image_bytes` (see REQ-8):\n+Config validation for `max_image_bytes`:\n \n - The value MUST be greater than 0\n - The value MUST NOT exceed 50 MiB (hardcoded ceiling)\n"}]},{"message":"The 'supported ceiling' for `max_images_per_turn` is not explicitly defined in this requirement or earlier in the spec. While the companion `channel-image-ingestion` spec and implementation files show the ceiling is 8, this spec should explicitly state the ceiling value for completeness and to avoid requiring cross-reference.","fixFiles":[{"filePath":"openspec/specs/runtime-image-pipeline/spec.md","diff":"diff --git a/openspec/specs/runtime-image-pipeline/spec.md b/openspec/specs/runtime-image-pipeline/spec.md\n--- a/openspec/specs/runtime-image-pipeline/spec.md\n+++ b/openspec/specs/runtime-image-pipeline/spec.md\n@@ -442,7 +442,7 @@\n - If `max_image_bytes` is set, it MUST be > 0 and <= 52428800 (50 MiB). Violation MUST produce a\n   startup error.\n - If `max_images_per_turn` is not set, the effective value MUST default to 4.\n-- If `max_images_per_turn` is set, it MUST be greater than 0 and within the supported ceiling.\n+- If `max_images_per_turn` is set, it MUST be greater than 0 and less than or equal to 8.\n   Violation MUST produce a startup error.\n - If `staged_image_reaper_threshold_minutes` is not set, the effective threshold MUST default to 30\n   minutes.\n"}]},{"message":"The `print_status` function has partial documentation in comments (lines 24-27)...

…t ceiling, improve docs

Agent-Logs-Url: https://github.com/dallay/corvus/sessions/222dc495-1d96-418f-a84e-614863ff188e

Co-authored-by: yacosta738 <33158051+yacosta738@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 11, 2026

Deploying corvus with  Cloudflare Pages  Cloudflare Pages

Latest commit: cda6d10
Status: ✅  Deploy successful!
Preview URL: https://acc4aec7.corvus-42x.pages.dev
Branch Preview URL: https://copilot-fix-tools-constant-l.corvus-42x.pages.dev

View logs

Copilot AI changed the title [WIP] Fix tools constant listing for clarity and availability fix: clarify Cerebro constants, fix Spanish heading, remove circular spec ref, explicit ceiling, improve shell docs Apr 11, 2026
Copilot AI requested a review from yacosta738 April 11, 2026 14:17
@yacosta738 yacosta738 marked this pull request as ready for review April 11, 2026 14:20
@yacosta738 yacosta738 merged commit 37b187d into main Apr 11, 2026
13 of 16 checks passed
@yacosta738 yacosta738 deleted the copilot/fix-tools-constant-listing branch April 11, 2026 14:40
@dallay-bot dallay-bot Bot mentioned this pull request Apr 11, 2026
@sonarqubecloud
Copy link
Copy Markdown

This was referenced May 15, 2026
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.

2 participants