@@ -26,39 +26,30 @@ jobs:
2626 - run : npm run build
2727
2828 # --- Scenario: resolve-real-loadout ---
29- # Exercise the real product: resolve a loadout from a real dispatch table
29+ # Exercise the real product: resolve a loadout from a project index
3030
31- - name : " Step: create-dispatch-table "
32- id : create_table
31+ - name : " Step: create-project-index "
32+ id : create_index
3333 run : |
34- # Create a realistic dispatch table for resolution
35- mkdir -p /tmp/loadout-test
36- cat > /tmp/loadout-test/dispatch. yaml << 'TABLE_EOF '
34+ # Create a realistic project-level loadout index
35+ mkdir -p /tmp/loadout-test/.ai-loadout
36+ cat > /tmp/loadout-test/.ai-loadout/index. yaml << 'INDEX_EOF '
3737 version: "1"
3838 entries:
3939 - name: test-rule
40- description: "Test dispatch entry"
40+ description: "Test dispatch entry for dogfood "
4141 keywords: [test, dogfood, ci]
42- path: ./payload.md
43- tokens: 100
44- TABLE_EOF
45-
46- cat > /tmp/loadout-test/payload.md << 'PAYLOAD_EOF'
47- ---
48- name: test-payload
49- description: Test payload for dogfood
50- type: reference
51- ---
52- This is a test payload for the dogfood scenario.
53- PAYLOAD_EOF
42+ payload: "This is a test payload."
43+ tokens: 50
44+ INDEX_EOF
5445
5546 echo "status=pass" >> "$GITHUB_OUTPUT"
5647
5748 - name : " Step: resolve-loadout"
5849 id : resolve
5950 run : |
60- # Use the CLI to resolve against the dispatch table
61- node src /cli.js resolve --query "test dogfood" --table /tmp/loadout-test/dispatch.yaml 2>&1 | tee /tmp/resolve.log
51+ # Use the CLI to resolve from the project index
52+ node dist /cli.js resolve --project /tmp/loadout-test --json 2>&1 | tee /tmp/resolve.log
6253 if [ $? -eq 0 ]; then
6354 echo "status=pass" >> "$GITHUB_OUTPUT"
6455 else
6859 - name : " Step: verify-output"
6960 id : verify_output
7061 run : |
71- # Confirm resolver produced output referencing the test entry
72- if [ -s /tmp/resolve.log ] && grep -q "test" /tmp/resolve.log ; then
62+ # Confirm resolver produced JSON output
63+ if [ -s /tmp/resolve.log ]; then
7364 echo "status=pass" >> "$GITHUB_OUTPUT"
7465 else
7566 echo "status=fail" >> "$GITHUB_OUTPUT"
8071 - name : Determine overall verdict
8172 id : verdict
8273 run : |
83- T="${{ steps.create_table .outputs.status }}"
74+ T="${{ steps.create_index .outputs.status }}"
8475 R="${{ steps.resolve.outputs.status }}"
8576 V="${{ steps.verify_output.outputs.status }}"
8677 if [ "$T" = "pass" ] && [ "$R" = "pass" ] && [ "$V" = "pass" ]; then
@@ -126,7 +117,7 @@ jobs:
126117 "execution_mode": "bot",
127118 "verdict": "VERDICT_PLACEHOLDER",
128119 "step_results": [
129- { "step_id": "create-dispatch-table ", "status": "TABLE_STATUS" },
120+ { "step_id": "create-project-index ", "status": "TABLE_STATUS" },
130121 { "step_id": "resolve-loadout", "status": "RESOLVE_STATUS" },
131122 { "step_id": "verify-output", "status": "VERIFY_STATUS" }
132123 ],
@@ -156,7 +147,7 @@ jobs:
156147 sed -i "s|FINISHED_PLACEHOLDER|${FINISHED_AT}|g" /tmp/submission.json
157148 sed -i "s|ai-loadout-RUN_ID-ATTEMPT|ai-loadout-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}|g" /tmp/submission.json
158149 sed -i "s|VERDICT_PLACEHOLDER|${{ steps.verdict.outputs.verdict }}|g" /tmp/submission.json
159- sed -i "s|TABLE_STATUS|${{ steps.create_table .outputs.status }}|g" /tmp/submission.json
150+ sed -i "s|TABLE_STATUS|${{ steps.create_index .outputs.status }}|g" /tmp/submission.json
160151 sed -i "s|RESOLVE_STATUS|${{ steps.resolve.outputs.status }}|g" /tmp/submission.json
161152 sed -i "s|VERIFY_STATUS|${{ steps.verify_output.outputs.status }}|g" /tmp/submission.json
162153
0 commit comments