Conversation
…ution workflow
- Add `experiments: prompt_style: [concise, verbose]` to frontmatter
- Wrap Sections 1-6 and Token Budget Guidelines with concise/verbose
conditional blocks using `{{#if (eq experiments.prompt_style "concise")}}`
- Regenerate lock file via `gh aw compile`
Closes #<issue>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/fc6233bc-38b0-43b7-9e11-4a0a345419b3
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…tructions - Section 1: add deferred-processing note (issues beyond 5 deferred to next run) - Section 2: add explicit "read the existing wiki page" before merge instruction Agent-Logs-Url: https://github.com/github/gh-aw/sessions/fc6233bc-38b0-43b7-9e11-4a0a345419b3 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
|
||
| ## Workflow | ||
|
|
||
| {{#if (eq experiments.prompt_style "concise")}} |
There was a problem hiding this comment.
Validate that this macro syntax is correct and recognized by action macros.
There was a problem hiding this comment.
Validated — the {{#if (eq experiments.prompt_style "concise")}} syntax was not previously recognized. The isTruthy function only handled simple falsy strings, so the (eq ...) expression was always truthy, and the condition never switched variants.
Fixed in commit 3aac568:
is_truthy.cjsnow evaluates(eq VALUE "LITERAL")expressions correctlyinterpolate_prompt.cjsstep 2.5 now substitutesexperiments.NAMEreferences inside{{#if ...}}conditions (in addition to__PLACEHOLDER__forms), so by the time the template renderer runs, the condition is(eq concise "concise")or(eq verbose "concise")with the actual variant value in place
| entry in `tier3_candidates_capped.json` (≤5), apply Tier 3 (one `issue_read` call per | ||
| issue). Anything unresolved → Tier 4. Issues beyond the first 5 in | ||
| `tier3_candidates.json` are deferred to the next run — do not process them. | ||
| {{else}} |
There was a problem hiding this comment.
@copilot, validate that this syntax is correct.
There was a problem hiding this comment.
Validated — {{else}} was not supported. The template renderer (renderMarkdownTemplate) had no {{else}} handling, so when the condition was truthy the entire body (including {{else}} text and the verbose branch) was kept as literal output. Both branches would appear in the prompt, and {{else}} would show up as raw text.
Fixed in commit 3aac568: renderMarkdownTemplate now splits the block body on {{else}} and keeps only the appropriate branch based on the condition's truthiness.
- is_truthy.cjs: handle (eq VALUE "LITERAL") equality helper expressions
so {{#if (eq concise "concise")}} evaluates correctly after experiment
placeholder substitution
- interpolate_prompt.cjs: split {{#if}}...{{else}}...{{/if}} blocks on the
{{else}} separator and keep the appropriate branch based on truthiness
- interpolate_prompt.cjs step 2.5: substitute experiments.NAME references
inside {{#if ...}} conditions (in addition to __PLACEHOLDER__ forms) so
(eq experiments.prompt_style "value") conditions resolve to actual values
- is_truthy.test.cjs: add tests for (eq ...) helper
- interpolate_prompt.test.cjs: add tests for {{else}} and (eq ...) rendering
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/ae04afdf-c413-4a21-bbbe-1632b9f369f0
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
…edback
- daily-community-attribution.md: {{else}} → {{#else}}, {{/if}} → {{#endif}},
(eq experiments.prompt_style "concise") → experiments.prompt_style == "concise"
- is_truthy.cjs: replace (eq v b) helper with GitHub Actions script style
v == "b" / v === "b" / v != "b" / v !== "b" equality expressions
- interpolate_prompt.cjs: {{else}} split → {{#else}}; closing tag regex now
matches {{#endif}} (primary) or {{/if}} (alternate) in both passes; update comments
- is_truthy.test.cjs: replace (eq ...) tests with v == b style tests
- interpolate_prompt.test.cjs: update new tests to use {{#else}}/{{#endif}}/v==b;
add test verifying {{/if}} alternate closing tag still works
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/be990686-bfaf-4163-8e65-1b4c281f0a98
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit
|
There was a problem hiding this comment.
Pull request overview
Implements a prompt_style A/B experiment for the daily-community-attribution workflow by adding concise/verbose prompt variants and extending the prompt templating engine to support {{#else}} / {{#endif}} and simple equality expressions in {{#if ...}} conditions.
Changes:
- Add
experiments: prompt_style: [concise, verbose]to the workflow and wrap major prompt sections with{{#if ...}} / {{#else}} / {{#endif}}. - Extend the template renderer to recognize
{{#else}}branches and{{#endif}}closers (keeping{{/if}}as an alternate). - Add
isTruthy()support + tests forlhs == "rhs"/!=-style conditions and tests for{{#else}}/{{#endif}}rendering; regenerate the workflow lockfile to include experiment selection steps.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/is_truthy.test.cjs | Adds unit tests for GitHub Actions-style equality parsing in isTruthy() |
| actions/setup/js/is_truthy.cjs | Adds parsing of ==/=== and !=/!== expressions before the generic truthy/falsy check |
| actions/setup/js/interpolate_prompt.test.cjs | Adds tests for {{#else}}/{{#endif}} rendering and equality-based condition evaluation |
| actions/setup/js/interpolate_prompt.cjs | Updates template rendering to support {{#else}} and {{#endif}}, and substitutes experiments.* references inside {{#if ...}} conditions |
| .github/workflows/daily-community-attribution.md | Adds experiment frontmatter + concise/verbose conditional variants for key workflow sections |
| .github/workflows/daily-community-attribution.lock.yml | Regenerates compiled lockfile including experiment pick/cache/artifact wiring and env propagation |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 6/6 changed files
- Comments generated: 4
| if (neqMatch) { | ||
| return neqMatch[1].trim() !== neqMatch[2]; | ||
| } | ||
|
|
| describe("GitHub Actions script style equality (v == b)", () => { | ||
| it("should return true when value matches literal with ==", () => { | ||
| expect(isTruthy('concise == "concise"')).toBe(true); | ||
| expect(isTruthy('verbose == "verbose"')).toBe(true); | ||
| expect(isTruthy('yes == "yes"')).toBe(true); |
| // | ||
| // Additionally, {{#if (eq experiments.name "value")}} conditions use the dot-notation | ||
| // form directly in the condition expression. We substitute experiments.NAME → actual | ||
| // value inside {{#if ...}} condition tags so that isTruthy can evaluate (eq ...) helpers. |
| - One `issue_read` per Tier 3 candidate | ||
| - Stop after safe-output call | ||
| - PR body under 400 words | ||
| - No external URLs |
🧪 Test Quality Sentinel ReportTest Quality Score: 89/100✅ Excellent test quality
Test Classification DetailsView All Test Classifications (11 tests)
Flagged Tests — Requires ReviewNo tests flagged. All new tests demonstrate solid behavioral coverage. Minor observation (not a failure): Language SupportTests analyzed:
Test Inflation Check
Both ratios are well below the 2:1 threshold. Verdict
📖 Understanding Test ClassificationsDesign Tests (High Value) verify what the system does:
Implementation Tests (Low Value) verify how the system does it:
Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators. References:
|
There was a problem hiding this comment.
✅ Test Quality Sentinel: 89/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 11 new tests verify behavioral contracts for the new {\{#else}}/{{/if}} template syntax and equality-expression support in isTruthy().
|
@copilot review all comments |
…ording - is_truthy.cjs: fix empty-LHS edge case — change (.+?) to (.*?) so a condition like ' == "concise"' (unset experiment var) correctly returns false instead of falling through to the truthy string check - is_truthy.test.cjs: rename describe block from 'v == b' to 'v == "b"' to accurately reflect that the RHS must be quoted; add empty-LHS test cases - interpolate_prompt.cjs: update Step 2.5 comment to remove stale (eq ...) references and describe the actual lhs == "rhs" syntax used after substitution - daily-community-attribution.md: reword "No external URLs" to "Do not access external URLs; use only GitHub MCP issue_read for GitHub data" for clarity Agent-Logs-Url: https://github.com/github/gh-aw/sessions/704460b1-ad87-4898-846d-0a5207729619 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Addressed in commit
|
Implements the
prompt_styleexperiment campaign ondaily-community-attributionto test whether a concise prompt reduces token consumption (≥20% target) without degrading attribution quality.Changes
experiments: prompt_style: [concise, verbose]— round-robin variant selection, ~20 runs per variant over ~40 days{{#if experiments.prompt_style == "concise"}}/{{#else}}/{{#endif}}blocksgh aw compile{{#else}}/{{#endif}}syntax and GitHub Actions script style equality expressions (v == "b"){{#if experiments.prompt_style == "concise"}} ### 1. Attribute Issues Read `pre_attributed.json` (Tier 0–2, pre-computed — do not re-derive). For each entry in `tier3_candidates_capped.json` (≤5), apply Tier 3 (one `issue_read` call per issue). Anything unresolved → Tier 4. Issues beyond the first 5 in `tier3_candidates.json` are deferred to the next run — do not process them. {{#else}} ### 1. Attribute All Resolved Community Issues ...full verbose instructions... {{#endif}}Template Engine Additions (
actions/setup/js)is_truthy.cjs: evaluates GitHub Actions script style equality expressions —concise == "concise"→true;verbose == "concise"→false; also supports===,!=,!==interpolate_prompt.cjsstep 2.5: substitutesexperiments.NAMEreferences inside{{#if ...}}conditions so the condition resolves to the actual runtime variant value before template renderinginterpolate_prompt.cjsrenderMarkdownTemplate: added{{#else}}branch splitting and{{#endif}}as primary closing tag (with{{/if}}retained as alternate) — keeps the true branch when condition is truthy, the false branch when falsyv == bequality inis_truthy.test.cjsand for{{#else}}/{{#endif}}rendering ininterpolate_prompt.test.cjs