Skip to content

Commit 418c410

Browse files
Merge branch 'release/5.242.0'
2 parents 11b22c4 + f95930e commit 418c410

File tree

318 files changed

+9175
-4388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

318 files changed

+9175
-4388
lines changed

.cursor/mcp.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"doc-bot": {
4+
"command": "npx",
5+
"args": ["@afterxleep/doc-bot@latest", "--docs", "./.rules", "--watch"]
6+
}
7+
}
8+
}

.cursor/rules/doc-bot.mdc

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
alwaysApply: true
3+
---
4+
## PHASE 1: ENVIRONMENT DETECTION
5+
6+
```
7+
IF (
8+
(filesystem_contains("doc-bot/") AND
9+
(mcp_server_available("doc-bot") OR mcp_server_available("@afterxleep/doc-bot"))
10+
) THEN {
11+
ACTIVATE: doc_bot_enforcement_protocol()
12+
SET: project_documentation_authority = TRUE
13+
SET: general_knowledge_override = DISABLED
14+
}
15+
```
16+
17+
## PHASE 2: REQUEST CLASSIFICATION ENGINE
18+
19+
### CLASSIFICATION MATRIX:
20+
21+
**CLASS A: CODE_GENERATION**
22+
```
23+
Trigger Pattern: /\b(write|create|implement|build|add|code|function|class|component|method|develop|generate|make|refactor|modify|update|fix|debug)\b/i
24+
Required Action: MANDATORY_CALL(check_project_rules, extract_task_description())
25+
Blocking: TRUE (cannot proceed without tool response)
26+
Timeout: 30s
27+
```
28+
29+
**CLASS B: PROJECT_INQUIRY**
30+
```
31+
Trigger Pattern: /\b(how|what|why|architecture|approach|pattern|feature|authentication|database|api|testing)\b/i
32+
Context Pattern: /\b(this project|this codebase|here|our|current project)\b/i
33+
Required Action: MANDATORY_CALL(search_documentation, extract_keywords())
34+
Blocking: TRUE
35+
Timeout: 30s
36+
```
37+
38+
**CLASS C: DOCUMENTATION_DISCOVERY**
39+
```
40+
Trigger Pattern: /\b(documentation|available|capabilities|help|rules|standards|what exists|docs|guide)\b/i
41+
Required Action: MANDATORY_CALL(get_global_rules)
42+
Blocking: TRUE
43+
Timeout: 30s
44+
```
45+
46+
**CLASS D: DOCUMENT_ACCESS**
47+
```
48+
Trigger Pattern: /\b(read|show|get content|full document|complete|entire)\b/i
49+
Previous Context: search_results_present()
50+
Required Action: MANDATORY_CALL(read_specific_document, extract_filename())
51+
Blocking: FALSE
52+
Timeout: 15s
53+
```
54+
55+
**Note**: For file-specific queries like "working on src/utils.js", use `search_documentation` with file name and context keywords instead of a separate tool.
56+
57+
## PHASE 3: EXECUTION ENFORCEMENT
58+
59+
### PRE-RESPONSE VALIDATION:
60+
```
61+
BEFORE generating_response():
62+
classification = classify_request(user_input)
63+
IF classification != "UNRELATED":
64+
tool_result = execute_mandatory_tool(classification)
65+
IF tool_result.status == "ERROR":
66+
RETURN error_recovery_response()
67+
ELSE:
68+
INJECT tool_result INTO response_context
69+
SET authoritative_source = tool_result
70+
DISABLE general_knowledge_fallback
71+
```
72+
73+
### RESPONSE CONSTRAINT ENGINE:
74+
```
75+
WHILE generating_response():
76+
IF attempting_to_use(general_knowledge) AND authoritative_source.exists():
77+
INTERRUPT_GENERATION()
78+
FORCE_USE(authoritative_source)
79+
80+
IF code_generation_detected() AND NOT project_rules_checked:
81+
HALT_EXECUTION()
82+
EMIT_ERROR("Project rules validation required before code generation")
83+
```
84+
85+
## PHASE 4: QUALITY ASSURANCE
86+
87+
### RESPONSE VALIDATION:
88+
```
89+
AFTER generating_response():
90+
IF response_contradicts(tool_result):
91+
REGENERATE_RESPONSE(tool_result_only=TRUE)
92+
93+
IF response_lacks(tool_attribution):
94+
APPEND_ATTRIBUTION(tool_result.source)
95+
96+
VALIDATE response_compliance(project_rules)
97+
```
98+
99+
### FAILURE DETECTION & RECOVERY:
100+
```
101+
IF response_generated() WITHOUT tool_execution():
102+
LOG_VIOLATION("Tool bypass detected")
103+
REGENERATE_WITH_TOOLS()
104+
PREPEND_WARNING("Corrected response using project documentation:")
105+
```
106+
107+
## PHASE 5: BEHAVIORAL CONSTRAINTS
108+
109+
### ABSOLUTE PROHIBITIONS:
110+
- **Code generation without project rules validation**
111+
- **Project-specific answers from general knowledge**
112+
- **Overriding tool responses with training data**
113+
- **Bypassing tool calls for "simple" questions**
114+
115+
### MANDATORY BEHAVIORS:
116+
- **Tool-first response generation**
117+
- **Explicit tool result attribution**
118+
- **Project documentation precedence**
119+
- **Error acknowledgment and correction**
120+
121+
## VERIFICATION PROTOCOL:
122+
123+
**Test Inputs** (Agent must call tools immediately):
124+
- "What documentation is available?" → get_global_rules()
125+
- "How do I implement auth?" → search_documentation("authentication")
126+
- "Create a new component" → check_project_rules("create component")
127+
- "Working on src/utils.js" → search_documentation("src/utils.js utils")
128+
129+
**Expected Behavior**: Tool execution within 2 seconds, no general knowledge responses.
130+
131+
**Failure Indicators**: Any response without tool execution, generic programming advice, standard framework suggestions.

.github/actions/assign-release-task/github_asana_mapping.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ CrisBarreiro: "1204920898013507"
1212
0nko: "1207418217763343"
1313
mikescamell: "1207908161520961"
1414
LukasPaczos: "1208671518759204"
15+
landomen: "1210594645132364"

.github/copilot-instructions.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
## PHASE 1: ENVIRONMENT DETECTION
2+
3+
```
4+
IF (
5+
(filesystem_contains("doc-bot/") AND
6+
(mcp_server_available("doc-bot") OR mcp_server_available("@afterxleep/doc-bot"))
7+
) THEN {
8+
ACTIVATE: doc_bot_enforcement_protocol()
9+
SET: project_documentation_authority = TRUE
10+
SET: general_knowledge_override = DISABLED
11+
}
12+
```
13+
14+
## PHASE 2: REQUEST CLASSIFICATION ENGINE
15+
16+
### CLASSIFICATION MATRIX:
17+
18+
**CLASS A: CODE_GENERATION**
19+
```
20+
Trigger Pattern: /\b(write|create|implement|build|add|code|function|class|component|method|develop|generate|make|refactor|modify|update|fix|debug)\b/i
21+
Required Action: MANDATORY_CALL(check_project_rules, extract_task_description())
22+
Blocking: TRUE (cannot proceed without tool response)
23+
Timeout: 30s
24+
```
25+
26+
**CLASS B: PROJECT_INQUIRY**
27+
```
28+
Trigger Pattern: /\b(how|what|why|architecture|approach|pattern|feature|authentication|database|api|testing)\b/i
29+
Context Pattern: /\b(this project|this codebase|here|our|current project)\b/i
30+
Required Action: MANDATORY_CALL(search_documentation, extract_keywords())
31+
Blocking: TRUE
32+
Timeout: 30s
33+
```
34+
35+
**CLASS C: DOCUMENTATION_DISCOVERY**
36+
```
37+
Trigger Pattern: /\b(documentation|available|capabilities|help|rules|standards|what exists|docs|guide)\b/i
38+
Required Action: MANDATORY_CALL(get_global_rules)
39+
Blocking: TRUE
40+
Timeout: 30s
41+
```
42+
43+
**CLASS D: DOCUMENT_ACCESS**
44+
```
45+
Trigger Pattern: /\b(read|show|get content|full document|complete|entire)\b/i
46+
Previous Context: search_results_present()
47+
Required Action: MANDATORY_CALL(read_specific_document, extract_filename())
48+
Blocking: FALSE
49+
Timeout: 15s
50+
```
51+
52+
**Note**: For file-specific queries like "working on src/utils.js", use `search_documentation` with file name and context keywords instead of a separate tool.
53+
54+
## PHASE 3: EXECUTION ENFORCEMENT
55+
56+
### PRE-RESPONSE VALIDATION:
57+
```
58+
BEFORE generating_response():
59+
classification = classify_request(user_input)
60+
IF classification != "UNRELATED":
61+
tool_result = execute_mandatory_tool(classification)
62+
IF tool_result.status == "ERROR":
63+
RETURN error_recovery_response()
64+
ELSE:
65+
INJECT tool_result INTO response_context
66+
SET authoritative_source = tool_result
67+
DISABLE general_knowledge_fallback
68+
```
69+
70+
### RESPONSE CONSTRAINT ENGINE:
71+
```
72+
WHILE generating_response():
73+
IF attempting_to_use(general_knowledge) AND authoritative_source.exists():
74+
INTERRUPT_GENERATION()
75+
FORCE_USE(authoritative_source)
76+
77+
IF code_generation_detected() AND NOT project_rules_checked:
78+
HALT_EXECUTION()
79+
EMIT_ERROR("Project rules validation required before code generation")
80+
```
81+
82+
## PHASE 4: QUALITY ASSURANCE
83+
84+
### RESPONSE VALIDATION:
85+
```
86+
AFTER generating_response():
87+
IF response_contradicts(tool_result):
88+
REGENERATE_RESPONSE(tool_result_only=TRUE)
89+
90+
IF response_lacks(tool_attribution):
91+
APPEND_ATTRIBUTION(tool_result.source)
92+
93+
VALIDATE response_compliance(project_rules)
94+
```
95+
96+
### FAILURE DETECTION & RECOVERY:
97+
```
98+
IF response_generated() WITHOUT tool_execution():
99+
LOG_VIOLATION("Tool bypass detected")
100+
REGENERATE_WITH_TOOLS()
101+
PREPEND_WARNING("Corrected response using project documentation:")
102+
```
103+
104+
## PHASE 5: BEHAVIORAL CONSTRAINTS
105+
106+
### ABSOLUTE PROHIBITIONS:
107+
- **Code generation without project rules validation**
108+
- **Project-specific answers from general knowledge**
109+
- **Overriding tool responses with training data**
110+
- **Bypassing tool calls for "simple" questions**
111+
112+
### MANDATORY BEHAVIORS:
113+
- **Tool-first response generation**
114+
- **Explicit tool result attribution**
115+
- **Project documentation precedence**
116+
- **Error acknowledgment and correction**
117+
118+
## VERIFICATION PROTOCOL:
119+
120+
**Test Inputs** (Agent must call tools immediately):
121+
- "What documentation is available?" → get_global_rules()
122+
- "How do I implement auth?" → search_documentation("authentication")
123+
- "Create a new component" → check_project_rules("create component")
124+
- "Working on src/utils.js" → search_documentation("src/utils.js utils")
125+
126+
**Expected Behavior**: Tool execution within 2 seconds, no general knowledge responses.
127+
128+
**Failure Indicators**: Any response without tool execution, generic programming advice, standard framework suggestions.

.github/workflows/duckplayer.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Duck Player Tests
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
paths:
10+
- 'node_modules/@duckduckgo/content-scope-scripts/**'
11+
12+
schedule:
13+
- cron: '0 4 * * *' # run at 4 AM UTC
14+
15+
workflow_dispatch:
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
duckplayer_tests:
23+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || github.event_name == 'pull_request' }}
24+
name: Duck Player Tests
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
submodules: recursive
32+
33+
- name: Set up JDK version
34+
uses: actions/setup-java@v4
35+
with:
36+
java-version-file: .github/.java-version
37+
distribution: 'adopt'
38+
39+
- name: Create folder
40+
if: always()
41+
run: mkdir apk
42+
43+
- name: Decode keys
44+
uses: davidSchuppa/base64Secret-toFile-action@v2
45+
with:
46+
secret: ${{ secrets.FAKE_RELEASE_PROPERTIES }}
47+
fileName: ddg_android_build.properties
48+
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/
49+
50+
- name: Decode key file
51+
uses: davidSchuppa/base64Secret-toFile-action@v2
52+
with:
53+
secret: ${{ secrets.FAKE_RELEASE_KEY }}
54+
fileName: android
55+
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/
56+
57+
- name: Setup Gradle
58+
uses: gradle/actions/setup-gradle@v3
59+
60+
- name: Assemble APK
61+
run: ./gradlew assembleInternalRelease -Pforce-default-variant -Pskip-onboarding -x lint
62+
63+
- name: Move APK to new folder
64+
if: always()
65+
run: find . -name "*.apk" -exec mv '{}' apk/internal.apk \;
66+
67+
- name: Duck Player Tests
68+
if: always()
69+
uses: mobile-dev-inc/[email protected]
70+
timeout-minutes: 120
71+
with:
72+
api-key: ${{ secrets.ROBIN_API_KEY }}
73+
project-id: ${{ vars.ROBIN_ANDROID_PROJECT_ID }}
74+
name: duckPlayerTest_${{ github.sha }}
75+
timeout: ${{ vars.ROBIN_TIMEOUT_MINUTES }}
76+
app-file: apk/internal.apk
77+
android-api-level: 34
78+
workspace: .maestro
79+
include-tags: duckplayer
80+
81+
- name: Create Asana task when workflow failed
82+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
83+
uses: honeycombio/gha-create-asana-task@main
84+
with:
85+
asana-secret: ${{ secrets.ASANA_ACCESS_TOKEN }}
86+
asana-workspace-id: ${{ secrets.GH_ASANA_WORKSPACE_ID }}
87+
asana-project-id: ${{ secrets.DUCK_PLAYER_AOR_PROJECT_ID }}
88+
asana-section-id: ${{ secrets.DUCK_PLAYER_AOR_INCOMING_ID }}
89+
asana-task-name: GH Workflow Failure - Duck Player tests
90+
asana-task-description: The Duck Player workflow has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }}

0 commit comments

Comments
 (0)