Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (codex): tighten closing-comment keyword patterns

[._.]/ Adam Eivyd5917c8fdb0d
diff --git a/server/services/layeredIntelligenceRejections.js b/server/services/layeredIntelligenceRejections.js
index e562a66c4b..0bedfa65d6 100644
--- a/server/services/layeredIntelligenceRejections.js
+++ b/server/services/layeredIntelligenceRejections.js
@@ -192,8 +192,7 @@ const CLOSING_COMMENT_PATTERNS = [
/\bnot (?:in|within) scope\b/,
/\bdoes ?n[o']?t (?:fit|belong)\b/,
/\bwo ?n[o']?t fit\b/,
- /\bnot (?:aligned|a (?:good )?fit)\b/,
- /\bnot something (?:we|this app|the app)\b/
+ /\bnot (?:aligned|a (?:good )?fit)\b/
]
},
{
@@ -201,7 +200,7 @@ const CLOSING_COMMENT_PATTERNS = [
patterns: [
/\b(?:need|needs|needing|require[sd]?) (?:more|additional|further) (?:info|information|context|detail|details|clarification)\b/,
/\b(?:not enough|insufficient|lack(?:s|ing)? (?:of )?) (?:info|information|context|detail|details)\b/,
- /\b(?:cannot|can'?t|could ?n'?t|couldn'?t|unable to) reproduce\b/,
+ /\b(?:can ?not|cannot|can'?t|could ?not|could ?n'?t|couldn'?t|unable to) reproduce\b/,
/\bunder[\s-]?specified\b/,
/\bplease clarify\b/,
/\bmore (?:details|information|context) (?:needed|required)\b/,
diff --git a/server/services/layeredIntelligenceRejections.test.js b/server/services/layeredIntelligenceRejections.test.js
index 39e1a59c71..255e444a6f 100644
--- a/server/services/layeredIntelligenceRejections.test.js
+++ b/server/services/layeredIntelligenceRejections.test.js
@@ -230,6 +230,24 @@ describe('classifyClosingComment', () => {
}
});
+ it('matches "could not reproduce" and its contractions', () => {
+ for (const text of [
+ 'We could not reproduce this.',
+ "We couldn't reproduce it.",
+ 'Cannot reproduce.',
+ 'can not reproduce'
+ ]) {
+ expect(classifyClosingComment(text)).toBe('missing-context');
+ }
+ });
+
+ it('does not misread a "not something we can reproduce" close as a scope mismatch', () => {
+ // The old broad "not something we" scope pattern misfired here. Dropping it
+ // yields the honest null (the negation isn't something a keyword pass can
+ // parse) — which falls through to unknown-reason — never a WRONG scope token.
+ expect(classifyClosingComment('This is not something we can reproduce.')).toBeNull();
+ });
+
it('matches across newlines and mixed case', () => {
expect(classifyClosingComment('Thanks for the idea!\n\nHowever this is\nOUT OF SCOPE here.'))
.toBe('scope-mismatch');