@kody-ade/kody-engine 0.4.167 → 0.4.169

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/kody.js CHANGED
@@ -1061,7 +1061,7 @@ var init_loadPriorArt = __esm({
1061
1061
  // package.json
1062
1062
  var package_default = {
1063
1063
  name: "@kody-ade/kody-engine",
1064
- version: "0.4.167",
1064
+ version: "0.4.169",
1065
1065
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
1066
1066
  license: "MIT",
1067
1067
  type: "module",
@@ -9087,6 +9087,35 @@ function humanizeSlug(slug) {
9087
9087
  return slug.split(/[-_]+/).filter((s) => s.length > 0).map((s) => s[0].toUpperCase() + s.slice(1)).join(" ");
9088
9088
  }
9089
9089
 
9090
+ // src/scripts/loadLinkedFinding.ts
9091
+ init_issue();
9092
+ var QA_FINDING_LABEL = /^(severity:p\d|goal:qa|kody:qa-finding)/i;
9093
+ var FINDING_BODY_MAX_BYTES = 4e3;
9094
+ function resolveFindingNumber(pr) {
9095
+ const fromBranch = /^(\d+)-/.exec(pr.headRefName)?.[1];
9096
+ if (fromBranch) return Number(fromBranch);
9097
+ const m = /(?:fix(?:e[sd])?|close[sd]?|resolve[sd]?)\s+#(\d+)/i.exec(pr.body);
9098
+ return m ? Number(m[1]) : null;
9099
+ }
9100
+ var loadLinkedFinding = async (ctx) => {
9101
+ ctx.data.linkedFinding = "";
9102
+ const pr = ctx.data.pr;
9103
+ if (!pr) return;
9104
+ const findingNumber = resolveFindingNumber(pr);
9105
+ if (!findingNumber) return;
9106
+ let issue;
9107
+ try {
9108
+ issue = getIssue(findingNumber, ctx.cwd);
9109
+ } catch {
9110
+ return;
9111
+ }
9112
+ const labels = issue.labels ?? [];
9113
+ if (!labels.some((l) => QA_FINDING_LABEL.test(l))) return;
9114
+ ctx.data.linkedFinding = `Issue #${issue.number}: ${issue.title}
9115
+
9116
+ ${truncate2(issue.body, FINDING_BODY_MAX_BYTES)}`;
9117
+ };
9118
+
9090
9119
  // src/scripts/index.ts
9091
9120
  init_loadMemoryContext();
9092
9121
  init_loadPriorArt();
@@ -9179,7 +9208,7 @@ function composeAuthBlock(authProfile, login, password) {
9179
9208
  return `Auth: a saved Playwright \`storageState.json\` is available at \`${authProfile}\`. Pass it to the browser via the \`storageState\` parameter so the session starts pre-authenticated.`;
9180
9209
  }
9181
9210
  if (login && password) {
9182
- return `Auth: log in once at the app's login page. Username: \`${login}\` \xB7 Password: \`${password}\`. Type each field key-by-key (Playwright \`locator.pressSequentially()\` / the MCP \`browser_type\` tool), NOT a one-shot \`fill()\` or value assignment: pasting a value in a single step often fails to fire the login form's framework onChange handler, so the form submits empty and you get a FALSE "invalid email or password". After typing, confirm the field shows the value before clicking submit; if the first attempt is rejected, re-type key-by-key before treating the credentials as wrong. Re-use the session afterwards.`;
9211
+ return `Auth: log in once at the app's login page. Username: \`${login}\` \xB7 Password: \`${password}\`. Type each field key-by-key (Playwright \`locator.pressSequentially()\` / the MCP \`browser_type\` tool), NOT a one-shot \`fill()\` or value assignment: pasting a value in a single step often fails to fire the login form's framework onChange handler, so the form submits empty and you get a FALSE "invalid email or password". After typing, confirm the field shows the value before clicking submit; if the first attempt is rejected, re-type key-by-key before treating the credentials as wrong. If a login form's inputs don't respond to typing-by-label/placeholder, inspect the DOM and target them by their \`id\`/\`name\` attribute instead \u2014 e.g. a Payload CMS admin login at \`/admin\` uses \`#field-email\` and \`#field-password\`. The app may have TWO separate logins (a public/frontend one and a Payload \`/admin\` one); if a change you must verify lives behind the admin, log into that form too. Re-use the session afterwards.`;
9183
9212
  }
9184
9213
  if (login) {
9185
9214
  return `Auth: username \`${login}\` is configured but no \`LOGIN_PASSWORD\` secret was found. Note auth-gated surfaces as gaps.`;
@@ -13068,6 +13097,7 @@ var preflightScripts = {
13068
13097
  loadWorkerAdhoc,
13069
13098
  loadConventions,
13070
13099
  loadCoverageRules,
13100
+ loadLinkedFinding,
13071
13101
  loadMemoryContext,
13072
13102
  loadPriorArt,
13073
13103
  loadQaContext,
@@ -69,6 +69,7 @@
69
69
  "preflight": [
70
70
  { "script": "setLifecycleLabel", "with": { "label": "kody:reviewing-ui", "color": "d93f0b", "description": "kody: UI-reviewing a PR" } },
71
71
  { "script": "reviewFlow" },
72
+ { "script": "loadLinkedFinding" },
72
73
  { "script": "loadTaskState" },
73
74
  { "script": "loadConventions" },
74
75
  { "script": "discoverQaContext" },
@@ -36,6 +36,19 @@ If `browser_navigate` errors out (timeout, DNS, connection refused, navigation a
36
36
 
37
37
  {{qaAuthBlock}}
38
38
 
39
+ {{#linkedFinding}}
40
+ # Originally reported bug this PR must resolve
41
+
42
+ This PR is a fix for the QA finding below. **Judge your verdict against whether this finding's reported symptom is actually gone in the running app — NOT merely whether the diff is internally correct.** Reproduce the finding's Steps on the preview and compare its Expected vs Actual:
43
+
44
+ - If the reported **Actual** behavior still reproduces in the browser, the verdict is **FAIL** (or CONCERNS if you genuinely could not reach it) — *even if the code change looks correct and the remaining cause is a separate env/config issue*. "Done" means the user no longer sees the bug, not that the author's narrow change landed.
45
+ - Only verdict **PASS** if you confirmed in the browser that the reported symptom is gone.
46
+
47
+ ```
48
+ {{linkedFinding}}
49
+ ```
50
+
51
+ {{/linkedFinding}}
39
52
  # Diff
40
53
 
41
54
  ```diff
@@ -113,8 +126,8 @@ _UI review by kody — browsed {{previewUrl}}_
113
126
 
114
127
  - **Never write credentials anywhere.** The QA login is provided only so you can sign in — you MUST NOT put the password (or any token/secret) into the review, findings, steps, or any text posted to GitHub. PRs and issues are often public. When describing an authenticated step, write "log in as the QA account" — never quote the username or the password.
115
128
  - No commits. No `git` / `gh` invocations. No edits to files outside `.kody/ui-review/`.
116
- - Verdict **FAIL** only for clear visual regressions, broken flows, or correctness/accessibility issues that block merge.
117
- - Verdict **CONCERNS** for clarity/polish/edge-case gaps that shouldn't block.
118
- - Verdict **PASS** when the PR's UI changes work as intended and nothing obvious is broken.
119
- - If the preview URL is unreachable, PASS/FAIL should be based on the diff alone, and the "Gaps" section must call that out.
129
+ - Verdict **FAIL** for clear visual regressions, broken flows, or correctness/accessibility issues that block merge. **Also FAIL when the PR claims to fix a specific user-visible symptom (named in the PR body or linked issue) and that symptom is STILL present in the browser** — report against the user-visible outcome, not just whether the diff is technically correct. A fix whose code path is right but whose reported symptom still reproduces is a FAIL.
130
+ - Verdict **CONCERNS** for clarity/polish/edge-case gaps that shouldn't block — **and whenever you could NOT confirm a UI-affecting change in the browser** (couldn't reach the page, couldn't log in, couldn't trigger the state). Do not upgrade an unverified change to PASS on the strength of reading the diff: a reviewer must not bless what it did not see. List every such gap explicitly.
131
+ - Verdict **PASS** only when you **confirmed in the browser** that the PR's changed behavior works as intended and nothing obvious is broken. PASS is a statement that you *saw it work*, not that the code looks correct.
132
+ - If the preview URL is unreachable, the verdict is **CONCERNS** (not PASS) with the "Gaps" section calling out that nothing could be browser-verified; reserve FAIL for problems you can still prove from the diff alone.
120
133
  - Be specific: every finding gets a route + screenshot reference, or a file:line reference. No generic advice.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.167",
3
+ "version": "0.4.169",
4
4
  "description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
5
5
  "license": "MIT",
6
6
  "type": "module",