@@ -729,12 +729,94 @@ function isTooTerseFeatureSection(text) {
729729}
730730
731731/**
732- * Bug Reproduction needs steps or concrete signals. A title-like phrase with
733- * no commands, paths, digits, or product keywords is not actionable.
732+ * Bug Reproduction needs concrete signals that let a maintainer reproduce the
733+ * failure. Product keywords alone (e.g. "choose model deepseek" or "send a
734+ * message in the codex plugin") are not actionable: the report must name a
735+ * command, an error, a file/config path, or an exact observed output.
734736 */
737+ // Commands and exact technical actions, e.g. "ocx start", "run bun",
738+ // "send a streaming request", "curl https://...".
739+ const REPRO_COMMAND_RE = new RegExp ( [
740+ "\\b(?:run|start|stop|restart|install|launch|execute|reproduce|trigger|invoke)\\s+(?:(?:the|an|a)\\s+)?(?:ocx|bun|npm|pnpm|yarn|curl|node|codex|proxy|server|dashboard|plugin)\\b" ,
741+ "\\b(?:ocx|bun|npm|pnpm|yarn|curl|node|codex)\\s+(?:start|run|stop|restart|install|config|--[a-z-]+)\\b" ,
742+ "\\b(?:send|issue|make|post)\\s+(?:a|an|any)\\s+(?:streaming|api|http|json|completion|chat|config|auth|embedding|post|graphql|grpc)\\s+(?:request|call|command|prompt|query)\\b" ,
743+ "\\b(?:send|issue|make|post)\\s+(?:a|an|any)\\s+(?:api|curl|endpoint|url)\\b" ,
744+ "\\b(?:send|issue|make|post)\\s+(?:a|an|any)\\s+[\\w.-]+\\s+request\\s+to\\s+(?:the\\s+)?(?:endpoint|url|api|server|proxy|\\S+/\\S+)\\b" ,
745+ "\\b(?:pip|npm|bun)\\s+install\\b" ,
746+ "\\b(?:curl|wget)\\s+[^\\s]+" ,
747+ ] . join ( "|" ) , "i" ) ;
748+
749+ // Error, exception, and failure tokens, plus status codes in status context
750+ // (bare 3-digit numbers can be ports or version numbers).
751+ const REPRO_FAILURE_RE = new RegExp ( [
752+ "\\b(?:segfault|sigsegv|panic|abort|exception|traceback|stack\\s*trace|timeout|timed\\s*out|refused|reset|denied|failed?|error|crash|hang|hangs?|stuck|spinning|empty\\s*response)\\b" ,
753+ "\\b(?:status\\s*(?:code\\s*)?|code\\s*|http\\s*)(?:is|of|:)?\\s*[1-5]\\d\\d\\b" ,
754+ ] . join ( "|" ) , "i" ) ;
755+
756+ // File, config, and log paths such as ~/.codex/config.toml or C:\\logs\\ocx.log.
757+ const REPRO_PATH_RE = new RegExp ( [
758+ "~?/[\\w.@-]+(?:/[\\w.@-]+)+" ,
759+ "[A-Za-z]:\\\\(?:[\\w.@-]+\\\\)+[\\w.@-]+" ,
760+ "~?/[\\w.@-]+/[\\w.@-]+\\.(?:json|yaml|yml|toml|conf|log|env|txt|ts|js|tsx|jsx|sh|ps1|py)" ,
761+ "[\\w.@-]+\\.(?:json|yaml|yml|toml|conf|log|env)\\b" ,
762+ ] . join ( "|" ) ) ;
763+ const ACTIONABLE_REPRO_RE = new RegExp (
764+ [ REPRO_COMMAND_RE . source , REPRO_FAILURE_RE . source , REPRO_PATH_RE . source ] . join ( "|" ) ,
765+ "i" ,
766+ ) ;
767+
768+ // Sigil-only fences with no body content are never actionable.
769+ const EMPTY_FENCE_RE = / ^ [ \t ] { 0 , 3 } (?: ` ` ` + | ~ ~ ~ + ) \s * \n \s * \n [ \t ] { 0 , 3 } (?: ` ` ` + | ~ ~ ~ + ) \s * $ / ;
770+
771+ /**
772+ * True when a bug Reproduction names commands, error tokens, file/config
773+ * paths, or exact technical actions. Product/model mentions without any of
774+ * those signals (e.g. #977) are treated as unactionable. Fenced blocks only
775+ * count as actionable when their body contains non-whitespace content.
776+ */
777+ function hasActionableReproductionDetail ( text ) {
778+ const c = clean ( text ) ;
779+ if ( ! c ) return false ;
780+ if ( ACTIONABLE_REPRO_RE . test ( c ) ) return true ;
781+ // Fenced blocks: only count when the body has non-whitespace content.
782+ if ( / ` ` ` | ~ ~ ~ / . test ( c ) ) {
783+ const parts = stripFencedActionableContent ( c ) ;
784+ if ( parts ) return true ;
785+ }
786+ return false ;
787+ }
788+
789+ /**
790+ * Walk the text looking for a fenced code block whose body contains
791+ * non-whitespace content. Returns the non-empty body or null.
792+ */
793+ function stripFencedActionableContent ( text ) {
794+ const fenceRe = / ^ [ \t ] { 0 , 3 } ( ` { 3 , } | ~ { 3 , } ) / ;
795+ const lines = text . split ( "\n" ) ;
796+ let i = 0 ;
797+ while ( i < lines . length ) {
798+ const m = lines [ i ] . match ( fenceRe ) ;
799+ if ( ! m ) { i ++ ; continue ; }
800+ const marker = m [ 1 ] ;
801+ const markerLen = marker . length ;
802+ // Find the closing fence on a later line.
803+ let j = i + 1 ;
804+ const endRe = new RegExp (
805+ `^[ \\t]{0,3}${ marker [ 0 ] === "`" ? "`" : "~" } {${ markerLen } ,}[ \\t]*$` ,
806+ ) ;
807+ while ( j < lines . length && ! endRe . test ( lines [ j ] ) ) j ++ ;
808+ if ( j > i + 1 ) {
809+ const body = lines . slice ( i + 1 , j ) . join ( "\n" ) ;
810+ if ( body . trim ( ) ) return body ;
811+ }
812+ i = j + 1 ;
813+ }
814+ return null ;
815+ }
816+
735817function isTooTerseBugReproduction ( text ) {
736818 if ( isEmpty ( text ) || isPlaceholder ( text ) ) return false ;
737- if ( hasConcreteDetail ( text ) ) return false ;
819+ if ( hasActionableReproductionDetail ( text ) ) return false ;
738820 return countWords ( text ) < 12 ;
739821}
740822
@@ -1221,6 +1303,7 @@ module.exports = {
12211303 isUnusableVersion,
12221304 countWords,
12231305 hasConcreteDetail,
1306+ hasActionableReproductionDetail,
12241307 labelForKind,
12251308 KIND_TO_LABEL ,
12261309 AREA_LABELS ,
0 commit comments