Daily improvements: command parsing robustness and classification stability#1
Draft
mastertyko wants to merge 5 commits into
Draft
Daily improvements: command parsing robustness and classification stability#1mastertyko wants to merge 5 commits into
mastertyko wants to merge 5 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)