-
Notifications
You must be signed in to change notification settings - Fork 0
[AI:Improver] 2026W31 #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dzykovic
wants to merge
3
commits into
master
Choose a base branch
from
ai/retrospective/2026W31
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| id: F20260806-46A6C4F0 | ||
| kind: finding | ||
| title: kindForTarget cannot resolve cross-kind status-update targets from singleton-scope retrospective stage | ||
| status: pending | ||
| priority: 3 | ||
| created_at: '2026-08-06T22:42:39Z' | ||
| parent_id: 2026W31 | ||
| --- | ||
|
|
||
| ## Problem | ||
| `kindForTarget` (`engine/pipeline/primitives/aop-applier.ts:380-402`) resolves explicit | ||
| work-item ids by falling back to the active item's kind. The retrospective stage runs under | ||
| `selector: singleton` with `scopeKind: week` (`engine/content/prompts/stages.yaml:228`), so | ||
| the active item is a retrospective-cycle. When the improver emits `status-update` blocks with | ||
| `target: F…` (finding ids), the applier routes them as `kind: retrospective-cycle`, gets | ||
| `WI_NOT_FOUND`, and pushes each into `applyErrors`. `weekly-metrics-stage.ts:311-324` only | ||
| logs successful applies, so the failure is silent. The 2026W31 retrospective falsely claimed | ||
| eleven findings were reconciled to `merged`; none were. | ||
|
|
||
| ## Solution | ||
| Either (a) extend `emitStatusUpdateSchema` / `kindForTarget` to accept an explicit `kind` | ||
| field (or resolve kind from id prefix/registry lookup), and add a regression test that applies | ||
| a cross-kind status-update from a retrospective-cycle active item; or (b) remove the weekly | ||
| reconciliation contract from `engine/content/prompts/agents/improver.md:92-107` if cross-kind | ||
| writes are intentionally unsupported from singleton-scope stages. Also log `applyErrors` at | ||
| WARN in `weekly-metrics-stage.ts` when non-empty. | ||
|
|
||
| ## Acceptance Criteria | ||
| - Improver `status-update` EMIT blocks targeting finding ids apply successfully from the | ||
| retrospective stage, OR improver.md no longer instructs agents to emit cross-kind updates | ||
| - Regression test fails on pre-fix `kindForTarget` fallback and passes after | ||
| - `weekly-metrics-stage` surfaces applyErrors at WARN when reconciliation events fail | ||
| - Build passes | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| ## Optimization 2026W31 | ||
|
|
||
| ### Prompt Changes Applied | ||
| - `.operator/context/engine.md`: Corrected `infra/` and `logging/` layer-graph lines — `infra/` lists `@operator/core` runtime, `logging/` (types), and `better-sqlite3`; `logging/` lists `@operator/core` (types only), `pino`, and optional `pino-pretty`. | ||
| - `.operator/analyst/consistency.md`: Aligned the intra-engine layer-graph bullet with the corrected `infra/` and `logging/` dependencies (including `infra/`'s type-only `Logger` import and `logging/`'s optional `pino-pretty`). | ||
| - `.operator/creator/engine.md`: Added regression-test policy requiring fixtures to exercise the actual pre-fix failure mode (quoted CRLF frontmatter example). | ||
|
|
||
| ### Task Changes | ||
| - No reprioritization — P2 security/resilience tasks (`T20260705-760BCFB4`, `T20260705-2BABD6A7`) already outrank P4–P5 split tasks. | ||
| - No cancellations — all seven pending split/security tasks remain valid; parent finding `F20260705-CC7FF1B9` still has open children. | ||
| - Task bodies for split tasks (`T20260705-94D578A1`, `T20260705-8B7B4079`, `T20260705-8A81A021`, `T20260705-94A14772`, `T20260705-7E556EBC`) already carry corrected line-count estimates from PR #33 review — no further clarification needed. | ||
|
|
||
| ### Status Reconciliation | ||
|
|
||
| Eleven finding status-update EMIT blocks were emitted during the improver run (F20260704-0001 | ||
| through F20260711-EEC50328, each with a completed child task cited in the reason). **None | ||
| applied.** On origin/master all eleven findings remain `in-progress`; this PR touches no finding | ||
| file. | ||
|
|
||
| **Cause:** `kindForTarget` (`aop-applier.ts:380-402`) resolves explicit cross-kind ids by | ||
| falling back to the active work-item's kind. The retrospective stage runs under | ||
| `selector: singleton` with `scopeKind: week` (`stages.yaml:228`), so the active item is a | ||
| retrospective-cycle — not `finding`. Every `status-update` with `target: F…` was routed as | ||
| `kind: retrospective-cycle`, produced `WI_NOT_FOUND`, landed in `applyErrors`, and was not | ||
| surfaced because `weekly-metrics-stage.ts:311-324` only logs successful applies. | ||
|
|
||
| **Follow-up:** A new finding is emitted via AOP in this supervisor cycle to fix `kindForTarget` | ||
| (or remove the weekly reconciliation contract from `improver.md:92-107` if cross-kind updates | ||
| are intentionally unsupported). Until that lands, improver runs must not claim findings were | ||
| reconciled. | ||
|
|
||
| **Orphaned child task removed:** The improver run also emitted a child task for | ||
| F20260705-0556B309 using the wrong key `parent_id:` (schema expects `parent:`); the applier | ||
| created root task T20260727-A58B1D9C with no parent. That task is deleted — the layer-graph fix | ||
| already landed on master via PR #35 (task T20260705-E0314F38); no replacement task is needed. | ||
|
|
||
| ### New Patterns (watching) | ||
| - **Structured log payload duplication**: PR #32 flagged putting raw diagnostic text in structured payload fields alongside redacted `msg` — `aop-applier.ts` already omits `message` from payload; watch for recurrence in new log sites. | ||
| - **`redactValue` special-object handling**: PR #34 requested Error/Date/URL preservation — already implemented in `redact.ts`; no further action unless new object types appear in log data. | ||
| - **`package.json` version load failures**: PR #29 noted `loadPackageVersion()` lacks validation — first occurrence; add creator rule if a second startup/help failure surfaces. | ||
| - **Test feature-flag names must match schema**: PR #28 flagged `dailyReport` in a test fixture — first occurrence; watch test hygiene. | ||
|
|
||
| ### No Changes Needed | ||
| - Analyzer prompt files: no "Analyzer Rejection Learning" section in this week's brief. | ||
| - Pending split tasks and P2 security/resilience tasks are correctly scoped and prioritized. | ||
| - `F20260705-F46054F2` stays open: WARN path fixed (`T20260705-F00733CA`) but pagination task `T20260705-2BABD6A7` still pending. | ||
| - `F20260705-F595B0A3` stays open: token-env stripping task `T20260705-760BCFB4` still pending. | ||
| - `packages.md` already correctly describes `@operator/core` runtime (Zod + error classes); no edit required. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[AI-REVIEWER] blocker — this section commits a false record: it asserts eleven findings were reconciled to status: merged, and none were (all eleven remain in-progress on origin/master; this PR touches no finding file). The cause is structural, not transient: kindForTarget (aop-applier.ts:380-402) cannot resolve an explicit cross-kind id from a singleton-scope stage (stages.yaml:228), so every status-update landed in applyErrors and was swallowed by weekly-metrics-stage.ts:319-324. Fix in this PR: rewrite the section to state what actually happened (updates were requested and did not apply). Separately, EMIT a new finding against kindForTarget so the weekly reconciliation advertised in improver.md:92-107 is either made to work or removed from the prompt — documentation that contradicts the tree is a defect (dev-context-engineering).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Addressed — Rewrote Status Reconciliation to state that eleven status-update EMIT blocks were emitted but none applied (kindForTarget cross-kind resolution failure). Emitting a new finding to fix kindForTarget or remove the reconciliation contract from improver.md.