Skip to content

feat: add fluent hidden options - #77

Merged
carldebilly merged 7 commits into
yllibed:mainfrom
autocarl:agent/issue-76-hidden-options
Jul 28, 2026
Merged

feat: add fluent hidden options#77
carldebilly merged 7 commits into
yllibed:mainfrom
autocarl:agent/issue-76-hidden-options

Conversation

@autocarl

@autocarl autocarl commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add option-level .Hidden(bool) metadata for direct command options, options-group properties, manually registered globals, and typed global options
  • keep hidden options parsable while filtering canonical tokens, aliases, descriptions, defaults, and value candidates from help, documentation, interactive/shell completion, and MCP schemas
  • add token-level HiddenAliases / .HiddenAlias(...) migration metadata so canonical options remain discoverable while legacy route/global aliases stay accepted only by CLI/REPL parsing; includes direct parameters, options-group properties, manual globals, and typed globals
  • require hidden command options to be omittable: options-group properties fail during mapping, while direct parameters are validated against the active provider during aggregate documentation/MCP discovery and may be satisfied by DI or synthesized progress; allow .Hidden(false) to restore visibility
  • share one last-registration-wins global token-ownership projection across parsing, help, documentation, completion, and MCP so hidden/visible route/global alias collisions remain consistent
  • preserve the historical six-parameter AddGlobalOptionCore descriptor for binary compatibility with already-compiled Repl.Defaults assemblies

Validation

  • strict Release build: 0 warnings, 0 errors
  • final local Release solution on eafe8f4: 1,413 total; 1,412 passed; 1 external MCP Inspector smoke skipped; 0 failed
  • CI passed on 0838355; current-head CI on eafe8f4 is running after final test-matrix coverage
  • NuGet pack: 10 packages plus 9 symbol packages
  • binary assembly-swap probe: baseline Repl.Defaults with candidate Repl.Core passed
  • real Bash completion smoke passed
  • changed documentation passed markdownlint
  • trimmed MCP sample publish produced a self-contained artifact; strict trim diagnostics are unchanged from origin/main

Closes #76

@autocarl

This comment was marked as resolved.

@carldebilly

This comment was marked as outdated.

@chatgpt-codex-connector

This comment was marked as outdated.

@carldebilly

This comment was marked as outdated.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@carldebilly

Copy link
Copy Markdown
Member

@codex please do a deep review of this pr

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@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: 6d48be511f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread docs/parameter-system.md Outdated
Comment thread src/Repl.Core/Documentation/DocumentationEngine.cs Outdated
@autocarl

Copy link
Copy Markdown
Contributor Author

Review follow-up complete on bc08f09.

  • Updated the parameter-system summary to describe CLR omittability, options-group validation, and provider-aware direct-parameter discovery.
  • Aligned discovery requiredness with the binder's synthetic IProgress<double> / IProgress<ReplProgressEvent> fallback through IReplInteractionChannel, while preserving direct service resolution.
  • Added CLI/documentation and MCP schema/invocation regressions for both progress forms, and made the MCP fixture use the production default-service topology.

Validation:

Both review threads were answered individually and resolved.

@carldebilly

Copy link
Copy Markdown
Member

@codex review please

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@autocarl

Copy link
Copy Markdown
Contributor Author

Latest review round complete on 2b4e663.

Two findings were reproducible and are fixed:

  • 138f61e: documentation export no longer materializes/finalizes the shared provider before later Use* service registrations.
  • 2b4e663: route-option completion now respects higher-precedence custom-global token ownership on both interactive and shell surfaces.

The reported CreateDocumentationModel(null) ambiguity was not reproducible: an external net10.0 consumer compiled both the ReplApp and CoreReplApp calls with 0 warnings / 0 errors and ran successfully, so no API change was made.

Validation:

All three threads were answered with evidence and resolved; no active review thread remains.

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/Repl.Core/Documentation/DocumentationEngine.cs Outdated
Comment thread src/Repl.Core/Documentation/DocumentationEngine.cs Outdated
@autocarl

Copy link
Copy Markdown
Contributor Author

Follow-up review round complete on 9e79af0.

Both new findings were reproducible and are fixed:

  • c231310: MCP discovery now accounts for the per-call interaction channel guaranteed by tool dispatch, including ICoreReplApp.BuildMcpServerOptions() with no base provider.
  • 9e79af0: aggregate documentation and MCP metadata now honor custom-global token ownership, filter shadowed aliases, reject shadowed MCP arguments, and fail closed for required route options that would otherwise become unreachable.

Validation:

  • dotnet test src/Repl.slnx -c Release: 1,376 passed, 0 failed, 1 expected external Inspector skip.
  • Focused MCP and documentation regressions passed, including a real MCP schema/allow-list call.
  • Main-agent seven-lens convergence review found no remaining material issue in this delta.
  • Final CI passed build/test/pack, Ubuntu, Windows, macOS, real-shell completion, and documentation lint: https://github.com/yllibed/repl/actions/runs/30174014819

Both threads were answered individually and resolved. No active review thread remains.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/Repl.Core/Internal/Options/OptionSchema.cs Outdated
chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@autocarl
autocarl force-pushed the agent/issue-76-hidden-options branch from 6bbd293 to e084e20 Compare July 26, 2026 13:16
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@autocarl

Copy link
Copy Markdown
Contributor Author

Published review fixes in 0543b78d70f9aeadb8b9bd8d461ec6cb258ab823.

Key changes:

  • atomically publish global parsing configuration snapshots and serialize route/comparer mutations;
  • preserve coherent parsing/help/completion ownership and case semantics;
  • harden hidden-alias reachability and MCP Boolean token reconstruction;
  • preserve the legacy routing event accessor and add an adapter-owned MCP contract handshake;
  • atomically close deferred routing-subscriber exception scopes.

Validation:

  • dotnet test src/Repl.slnx -c Release: 1,448 succeeded, 0 failed, 1 opt-in external smoke skipped;
  • git diff --check: clean;
  • old-Repl.Mcp/new-Core binary probe: fail-closed, handler not invoked.

All 11 outstanding review threads received individual replies and were resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@autocarl

Copy link
Copy Markdown
Contributor Author

Addressed the two Codex findings in 32e6d6a1b915eb89e1b241c6e20d432ccc3e9bcd.

  • Structured/programmatic invocations no longer expand response-file tokens, preventing MCP values from injecting hidden CLI options while retaining normal CLI response-file behavior.
  • Unknown-option suggestions now resolve discoverable tokens with the invocation-captured case mode.

Validation:

  • focused MCP adapter tests: 32 passed;
  • focused invocation parser tests: 12 passed;
  • dotnet test src/Repl.slnx -c Release: 1,450 passed, 0 failed, 1 opt-in external smoke skipped;
  • legacy Repl.Mcp / new Core probe: fail-closed before handler invocation;
  • git diff --check: clean.

Both Codex threads received individual replies and were resolved.

@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: 32e6d6a1b9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/Repl.Core/Help/HelpTextBuilder.Rendering.cs
Comment thread src/Repl.Core/Autocomplete/AutocompleteEngine.cs Outdated
Comment thread src/Repl.Mcp/McpServerHandler.cs

@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: 0a660dbd52

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/Repl.Core/Help/HelpTextBuilder.Rendering.cs Outdated
Comment thread src/Repl.Core/Help/HelpTextBuilder.Rendering.cs Outdated
@carldebilly
carldebilly merged commit d4f0398 into yllibed:main Jul 28, 2026
7 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.

Add fluent .Hidden() support for command and global options

2 participants