Skip to content

Daily improvements: command parsing robustness and classification stability#1

Draft
mastertyko wants to merge 5 commits into
mainfrom
codex/daily-improvements-2026-05-21
Draft

Daily improvements: command parsing robustness and classification stability#1
mastertyko wants to merge 5 commits into
mainfrom
codex/daily-improvements-2026-05-21

Conversation

@mastertyko
Copy link
Copy Markdown
Owner

Summary\n- make port inference tolerate trailing punctuation in inline and separate flag values\n- add conservative hostname host:port inference for protocol-free service commands\n- parse URL-based shell-default env expressions when inferring ports\n- reduce command parser overhead by reusing precompiled regexes and static flag sets\n- normalize lifecycle mode tokens for case/punctuation resilient framework details\n\n## Verification\n- swift test\n- swift test --filter CommandParserTests\n- targeted parser regression filters during each commit\n\n## Notes\n- 5 independent commits were pushed to this branch (one per improvement)

Constraint: Process snapshots often include tokens with trailing punctuation from shell snippets
Rejected: Strict numeric-only parsing | Dropped valid --port/--inspect values with comma/semicolon suffixes
Confidence: high
Scope-risk: narrow
Directive: Preserve strict port bounds while tolerating harmless trailing separators
Tested: swift test --filter CommandParserTests/testInferPortsFromInlinePortFlagsWithTrailingPunctuation --filter CommandParserTests/testInferPortsFromSeparateFlagArgumentsWithTrailingPunctuation
Not-tested: Full package test suite
Constraint: Service commands often use protocol-free hostnames such as api.local:4173
Rejected: Parse every token containing a colon | Would inflate false positives from generic label:value tokens
Confidence: high
Scope-risk: narrow
Directive: Keep hostname inference conservative unless another strong server signal exists
Tested: swift test --filter CommandParserTests/testInferPortsFromHostnameHostTokens --filter CommandParserTests/testInferPortsIgnoresAmbiguousTokenWithoutHostnameSignal
Not-tested: Full package test suite
Constraint: Real process commands often embed defaults like PORT=http://localhost:3000
Rejected: Only numeric shell-default parsing | Missed explicit URL fallbacks commonly used in templates
Confidence: high
Scope-risk: narrow
Directive: Keep shell-default parsing tolerant to trailing separators after closing braces
Tested: swift test --filter CommandParserTests/testInferPortsFromEnvironmentAssignmentsWithShellDefaultsContainingURLs
Not-tested: Full package test suite
Constraint: Process scanning re-runs command parsing on every refresh cycle
Rejected: Keep per-token regex compilation | Adds avoidable CPU and allocation churn under frequent polling
Confidence: high
Scope-risk: narrow
Directive: Add future inline-port patterns to shared precompiled regex collection
Tested: swift test --filter CommandParserTests
Not-tested: Full package test suite
Constraint: Process command tokens can be uppercased or suffixed by separators in shell snippets
Rejected: Case-sensitive mode matching | Dropped useful Mode hints in the dashboard for valid runtime commands
Confidence: high
Scope-risk: narrow
Directive: Keep lifecycle mode matching normalized before comparing framework tokens
Tested: swift test --filter CommandParserTests/testViteModeDetectionIsCaseInsensitiveAndPunctuationTolerant
Not-tested: Full package test suite
@mastertyko mastertyko added codex Changes produced by Codex automation codex-automation Automated Codex background run labels May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex Changes produced by Codex automation codex-automation Automated Codex background run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant