Skip to content

Add JSDoc documentation to CLI lifecycle functions - #43

Merged
clduab11 merged 4 commits into
codex/launch-readiness-fixesfrom
copilot/sub-pr-42
Feb 11, 2026
Merged

Add JSDoc documentation to CLI lifecycle functions#43
clduab11 merged 4 commits into
codex/launch-readiness-fixesfrom
copilot/sub-pr-42

Conversation

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

Added missing JSDoc documentation to functions introduced in the launch readiness fixes PR to satisfy documentation coverage requirements.

Functions documented:

  • resolveCliAutoShutdown() - Interprets CODEX_CLI_AUTO_SHUTDOWN environment variable with default behavior and supported values ('0', 'false', 'no')
  • renderBackgroundDaemonStatus() - Renders daemon status including PID, start time, interface mode/tier
  • useSystem() - System lifecycle management with updated options parameter for auto-shutdown control
  • UseSystemOptions type - Configuration options for system lifecycle behavior

All documentation follows established JSDoc conventions with @param, @returns, and @remarks tags.

/**
 * Resolves whether CLI should auto-shutdown after command execution by 
 * interpreting the CODEX_CLI_AUTO_SHUTDOWN environment variable.
 * 
 * @returns true if auto-shutdown is enabled, false otherwise
 * 
 * @remarks
 * - Returns true if CODEX_CLI_AUTO_SHUTDOWN is not set or is empty (default behavior)
 * - Returns false if CODEX_CLI_AUTO_SHUTDOWN is '0', 'false', or 'no' (case-insensitive)
 * - Returns true for any other value
 */
function resolveCliAutoShutdown(): boolean { ... }

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Continue Tasks: ▶️ 5 queued — View all

@clduab11 clduab11 added documentation Improvements or additions to documentation codex OpenAI's Codex bot general improvements General QOL improvements and random small bug fixex and patches p2-medium (Linear) Medium priority stack size-m domain → infrastructure (Linear) labels Feb 11, 2026
Copilot AI and others added 3 commits February 11, 2026 18:25
Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>
Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>
Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Codex-Synaptic CLI handling for OpenAI integration Add JSDoc documentation to CLI lifecycle functions Feb 11, 2026
Copilot AI requested a review from clduab11 February 11, 2026 18:29
@clduab11
clduab11 marked this pull request as ready for review February 11, 2026 18:32
@clduab11
clduab11 merged commit e171d1c into codex/launch-readiness-fixes Feb 11, 2026
@clduab11
clduab11 deleted the copilot/sub-pr-42 branch February 11, 2026 18:32

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

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package-lock.json
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
"license": "MIT",
"peer": true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Revert peer-only flag on direct runtime dependency

The lockfile now marks ws as "peer": true even though the root package declares it in dependencies; Arborist trusts this metadata from package-lock.json, and npm ci/npm install explicitly support --omit=peer to skip peer-typed nodes, so installs in that mode will incorrectly omit ws (and zod in the same commit) from disk. This turns a documentation-only change into a dependency graph regression for environments that use peer omission.

Useful? React with 👍 / 👎.

clduab11 added a commit that referenced this pull request Feb 11, 2026
… status reporting [PAP-17] (#42)

* Fix codex-synaptic launch blockers

* Document launch readiness fixes

* Update docs/runbooks/autoscaler-daemon-coordination.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update src/cli/index.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Add JSDoc documentation to CLI lifecycle functions (#43)

* Initial plan

* Initial plan for adding docstrings

Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>

* Add JSDoc docstrings for CLI functions

Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>

* Consolidate docstring for resolveCliAutoShutdown

Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>

* Add JSDoc documentation to satisfy 80% docstring coverage threshold (#44)

* Initial plan

* Add comprehensive JSDoc documentation to CLI functions

- Added 45+ JSDoc docstrings to previously undocumented functions
- Documented all lifecycle functions (loadEnvFile, bootstrapCliEnv, etc.)
- Documented all rendering functions (renderAgentTable, renderMeshStatus, etc.)
- Documented all interactive menu functions (interactiveSystemMenu, etc.)
- Documented all utility functions (parseInteger, formatBytes, tokenizeCliArgs, etc.)
- Documented helper functions (shouldAutoAttachCodexContext, shouldRequireConsensus, etc.)
- All docstrings follow JSDoc format with @param, @returns, and @remarks tags
- Improves docstring coverage toward 80% threshold requirement

Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>

* Add JSDoc documentation to OpenAI and core utility functions

- Added docstrings to OpenAI credential resolution functions
- Added docstrings to model catalog functions (getStaticOpenAIModelCatalog, mergeModelInventory)
- Added docstrings to inference functions (inferModalitiesFromIdentifier, inferCapabilitiesFromIdentifier)
- Added docstrings to core system helper functions (cloneCodexContext, cloneCodexEnvelope, cloneFileTreeNode)
- All docstrings follow JSDoc format with @param, @returns, and @remarks tags
- Further improves docstring coverage across modified files

Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>

* Refactor complex hive-mind spawn handler to resolve CodeFactor complexity warnings (#45)

* Initial plan

* Refactor complex hive-mind spawn command into helper functions

Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>

* Update src/cli/index.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Chris Dukes <chrisdukes@iMac.attlocal.net>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex OpenAI's Codex bot documentation Improvements or additions to documentation domain → infrastructure (Linear) general improvements General QOL improvements and random small bug fixex and patches p2-medium (Linear) Medium priority stack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants