Skip to content

fix(keyword-detector): ignore ulw skill names - #7025

Open
dajiaohuang wants to merge 1 commit into
code-yeongyu:devfrom
dajiaohuang:fix/6876-ulw-skill-keyword-guard
Open

fix(keyword-detector): ignore ulw skill names#7025
dajiaohuang wants to merge 1 commit into
code-yeongyu:devfrom
dajiaohuang:fix/6876-ulw-skill-keyword-guard

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Aug 18, 2026

Copy link
Copy Markdown

Summary

  • port the existing Codex negative lookahead to the OpenCode ultrawork detector
  • keep standalone ulw, ultrawork, and the distinct ulw-loop boundary active
  • prevent ulw-plan and ulw-research skill names from double-injecting ultrawork mode

Tests and QA

  • npx --yes bun test packages/omo-opencode/src/hooks/keyword-detector/ultrawork-edge-trigger.test.ts (6 passed)
  • npx --yes bun test packages/omo-opencode/src/hooks/keyword-detector (92 passed)
  • npx --yes bun x tsgo --noEmit -p packages/omo-opencode/tsconfig.json
  • targeted Bun bundle of constants.ts
  • isolated eight-case detector boundary probe

The repository prepare build still reaches the known Windows-only lsp-tools-mcp POSIX rm portability failure. The focused tests, complete detector suite, package typecheck, targeted bundle, and isolated probe pass independently.

Risk

Low. The regex change matches the established Codex detector and only narrows two hyphenated skill-name boundaries.

Related: #6876

@gitguardian

gitguardian Bot commented Aug 20, 2026

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@iggykimi iggykimi 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.

Independent verification on Windows 11 (the platform where this PR's README notes the repo prepare build fails) — @iggykimi

  • bun install: clean (1246 packages, ~260s)
  • Focused gate: bun test packages/omo-opencode/src/hooks/keyword-detector/ultrawork-edge-trigger.test.ts6 pass / 0 fail / 25 assertions
  • Full suite: bun test packages/omo-opencode/src/hooks/keyword-detector/92 pass / 0 fail / 245 assertions

Boundary semantics confirmed live on Windows: standalone ulw, ultrawork, ulw-loop activate; ulw-plan and ulw-research no longer double-inject the ultrawork mode prompt. Matches the Codex-side guard behavior.

LGTM — thanks for including the .omo/evidence/ artifacts.

@iggykimi

Copy link
Copy Markdown

Follow-up to my approval above, with precise scope:

  • Environment: Windows 11, bun 1.3.14, clean clone at 03b2088.
  • Pattern parity: the PR's detector at constants.ts:36/\b(?:ultrawork|ulw(?!-(?:plan|research)))\b/i — uses the exact negative lookahead of the Codex-side guard (codex-hook.ts:5: /(?:ultrawork|ulw(?!-(?:plan|research)))/i); the opencode side only adds \b boundaries. Semantics match.
  • Tests: focused gate 6 pass / 25 assertions; full keyword-detector suite 92 pass / 0 fail / 245 assertions (numbers as stated in the approval).
  • Build: bun run prepare (full build incl. lsp-tools-mcp) completed with exit 0 on this machine — the known Windows prepare failure noted in the PR description did not reproduce in this environment, so the change is green end-to-end here, not just at test level.

@dajiaohuang

Copy link
Copy Markdown
Author

Thanks for the precise Windows follow-up. The 92-test keyword-detector run and full prepare exit 0 close the Windows build uncertainty recorded in the PR, and your pattern comparison confirms the OpenCode guard matches the established Codex behavior. I also rechecked the current dev branch: it still has the unguarded ultrawork/ulw pattern, so this PR remains the only OpenCode-side fix. No code change is needed from this feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

opencode OpenCode edition: packages/omo-opencode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants