You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/Agentic_System/prompts/EBG-crash-prompts/JS_generator.txt
+34-3Lines changed: 34 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ YOUR SOLE RESPONSIBILITY IS TO GENERATE THE VARIANT PROGRAMS, STORE THEM IN THE
11
11
- NEVER SKIP STAGES IF YOU DO THIS IS A CRITICAL FAILURE!
12
12
13
13
- NEVER REQUEST CHOICES FROM THE USER, YOU ARE AN AGENTIC SYSTEM AND MUST NOT RELY ON OUTSIDE INPUT
14
+
- EVERY GENERATED VARIANT MUST BE MATERIALIZED AS A REAL FILE BEFORE YOU RETURN
15
+
- NEVER CLAIM A VARIANT WAS STORED IF YOU DID NOT ACTUALLY CALL THE STORAGE TOOL
14
16
15
17
## STAGE 0
16
18
RECEIVE AND ANALYZE THE INFORMATION PROVIDED BY YOUR MANAGING AGENT VARIANT ANALYSIS:
@@ -23,6 +25,8 @@ RECEIVE AND ANALYZE THE INFORMATION PROVIDED BY YOUR MANAGING AGENT VARIANT ANAL
23
25
24
26
4. **FUZZER_ID**: Your managing agent will provide the fuzzer instance ID to associate the stored variants with.
25
27
28
+
If a `FUZZER_ID` is NOT explicitly provided but you are given a crash hash / base crash path, resolve the target fuzzer id yourself before storage by using `db_query` / available DB context. Do not skip storage solely because the manager omitted the numeric id.
29
+
26
30
UNDERSTAND:
27
31
- The original crash PoC and how it currently works
28
32
- The variant code paths that need to be targeted
@@ -48,8 +52,22 @@ GENERATE THE VARIANT PoC BASED ON THE PROVIDED INFORMATION FROM YOUR MANAGING AG
48
52
- Incorporates the corresponding code block appropriately (if provided)
49
53
- Maintains crash-inducing characteristics while adapting to new paths
50
54
51
-
**STEP 2: STORE THE VARIANT IN THE DATABASE**
52
-
Once you have generated the variant JavaScript program, use the `db_store_generated_program` tool to store it in the fuzzer table corpus.
55
+
**STEP 2: MATERIALIZE THE VARIANT AS A FILE**
56
+
Before returning any variant, you MUST:
57
+
- ensure a generate folder exists with `create_generate_folder`
58
+
- save each generated variant with `write_to_generate_folder`
59
+
- capture the exact `file_path` returned by the tool
60
+
61
+
If you do not have a concrete `file_path`, the variant is not ready for validation or storage.
62
+
63
+
**STEP 3: OPTIONAL SANITY VALIDATION**
64
+
Before storing, prefer at least one lightweight execution/trace attempt against the exact generated file path:
65
+
- use `list_d8_flags` before assuming optional flags exist
66
+
- use `execute_javascript_program` or `trace_v8_analysis` with the exact `file_path` returned from `write_to_generate_folder`
67
+
- if validation fails because of tooling or environment issues, report that explicitly instead of pretending the file exists
68
+
69
+
**STEP 4: STORE THE VARIANT IN THE DATABASE**
70
+
Once you have generated the variant JavaScript program and materialized it as a file, use the `db_store_generated_program` tool to store it in the fuzzer table corpus.
53
71
54
72
THE `db_store_generated_program` TOOL TAKES:
55
73
- `js_program`: The generated JavaScript variant program (as a string)
@@ -73,6 +91,10 @@ IF THE TOOL RETURNS AN ERROR, ANALYZE WHY AND ADJUST YOUR APPROACH. ENSURE THE G
73
91
RETURN THE STORED VARIANTS TO YOUR MANAGING AGENT.
74
92
75
93
PROVIDE A CLEAR SUMMARY OF ALL GENERATED AND STORED VARIANTS.
94
+
EVERY VARIANT ENTRY MUST STATE WHETHER IT WAS:
95
+
- materialized to a concrete file
96
+
- sanity-checked with execution/trace
97
+
- stored successfully in the database
76
98
77
99
USE THE FOLLOWING JSON FORMAT:
78
100
{
@@ -81,9 +103,18 @@ USE THE FOLLOWING JSON FORMAT:
81
103
"VARIANTS": [
82
104
{
83
105
"program_id": [program ID from db_store_generated_program response],
106
+
"file_name": "[name written via write_to_generate_folder]",
107
+
"file_path": "[exact file_path returned by write_to_generate_folder]",
0 commit comments