chore(memory): promote strong-fit authentication drafts from memory-pipeline for review#131
chore(memory): promote strong-fit authentication drafts from memory-pipeline for review#131Hareet wants to merge 15 commits into
Conversation
LLM_PROVIDER=claude-cli runs filter/distill via 'claude -p' on the operator's subscription (no API key). isRateLimitError/isAuthError/isBatchFatalError detect global LLM failures so the runner can stop the batch instead of flagging each PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…auth --concurrency (PIPELINE_CONCURRENCY, [1,10]) worker pool; --last removes the ~100-PR per-run cap; --resume skips processed PRs; --force bypasses filter. Rate-limit/auth errors stop the batch (exit 2) with a resume hint. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… gate; pin Node 22 CI validates the domains/ corpus on PRs and fresh drafts in the pipeline run. .env.example set for claude-cli + Opus 4.8/max + concurrency 4; .nvmrc=22.18.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ructure to VALID_DOMAINS Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ft with a test Derive CHTDomain/CHTService/CHTWorkflow from the CHT_DOMAINS/CHT_SERVICES/CHT_WORKFLOWS const arrays; pipeline.ts re-exports instead of re-declaring; distiller imports CHT_SERVICES. New test asserts schema.json enums == the const arrays. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
schema.json enums, doc-search Record maps, TEMPLATE.md, and distiller/domain-inference tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…n't rejected Both VALID_DOMAINS hand-lists now derive from CHT_DOMAINS; updates the validator test message. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ons, re-export) Shared linear JSON extractor; CC refactors + justified NOSONAR; more Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…R not honored) Extracted helpers; SonarCloud Automatic Analysis ignores the NOSONAR block, so refactored to <=5. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rameters) logPrStart/processBatchItem/runWorker now take a shared BatchCtx, each <=4 params; CC still <=5. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rage exclude Proxyquire tests for the run-pipeline helpers + concurrency>1; export 3 helpers for testing. Only providers/open-review-pr/domain-inference stay excluded; coverage gate green Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1979c05 to
6a2742a
Compare
sugat009
left a comment
There was a problem hiding this comment.
Requesting changes, though to be clear the fix is upstream and not something to patch by hand here. This seeder faithfully promotes what the distillation pipeline generated, so nothing is wrong with the promotion itself. The problem is in the drafts the pipeline produced, and I verified it against the live medic/cht-core API for every draft in this PR.
The defect: issueNumber / issueUrl name the merge PR, not the resolved issue
One precise note up front, because the intuitive version of this is not what is happening: issueNumber and issueUrl always agree with each other (the URL is literally /issues/<issueNumber>). The bug is that in 19 of 39 drafts here, that shared number is a pull request, so /issues/N silently redirects to /pull/N. The real resolved issue survives only in the PR-title slug. For example:
8675-feat6530-add-rate-limiting...storesissueNumber: 8675/issueUrl: .../issues/8675, but 8675 is the merge PR ("feat(#6530): add rate limiting for authentication requests"). The real issue is #6530 (closed): "Add rate limiting to authentication endpoints".10414-fix6784-safari-unsupported-browser...storesissueNumber: 10414/issueUrl: .../issues/10414, but 10414 is the merge PR ("fix(#6784): safari unsupported browser message in login page"). The real issue is #6784 (closed): "Alert Safari users CHT doesn't support their browser".
This is the same scraper behaviour flagged on #121, and it is pipeline-wide: across the four clean seeders, 60 of 107 drafts are affected.
Duplicates in this PR. Because each draft is keyed by its PR, some resolved issues appear more than once:
- Issue #8868 is promoted twice (
8924,8933). - Three issues are also promoted in the contacts seeder #132 (cross-domain duplicates): #9835, #9065, #6543.
Also. One draft (8843) comes from a PR titled feat(na): ... with no linked issue at all, so there is no real issue for it to reference.
Why request-changes rather than merge-and-fix-later
This corpus is the agent's memory of resolved issues (consumed by the Context Analysis Agent, see #135). A reference that resolves to a PR instead of the issue is simply wrong data, and it specifically defeats #135's planned de-duplication by issue id, since the "id" ends up being the PR id. Regenerating the drafts after the upstream fix will rewrite most of these files anyway, so merging now would churn the corpus twice.
Suggested fix (at the source, not file by file)
- Fix the distiller/scraper to take the resolved issue from the
type(#N):PR title (the filename slug already extracts it correctly), and keep the PR number insource_prwhere it belongs. - Regenerate and re-promote this domain's drafts.
- Add de-duplication by real issue id (also a #135 acceptance item).
Open to discussing the approach. Once the drafts carry the real issue references, this should be a quick re-review.
Promotes 39 strong-fit
authenticationdrafts fromagent-memory/_pending/intoagent-memory/domains/authentication/issues/for squad content review.Categories: feature (15), bug (15), improvement (9)
Themes: SSO/OIDC login flows, token-login, permission checks & role revocation, password-reset/edit guards, multi-facility users.
All 39 carry
domainFit: strong+ a## Domain Rationalesection. 4 weak-fit drafts deferred for later.seeding-claude-cli-v2(feat(#108): seeding pipeline - CLI provider, domain-rationale, infrastructure domain, concurrency #119) — retarget tomainafter the schema lands.validate-schema: passing, 0 failures.