Repository navigation
fix(correlation): project-scope the synthetic tf- key (AIFactory#1972) - #1477
Merged
Merged
Conversation
Plan step 4 (olafkfreund/AIFactory plan/2026-10-30-1972-project-scoped-synthetic-key.md): tf-<project_id>:<spec_id> from one helper shared by the triager and the hand-back; over 128 chars it logs and sets no key, never truncates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5j1hQCdA4NmA4jiKDNBX4
TFactory coverage54.81% on this PR vs 54.71% on its base ( PASS - Coverage 54.81% (up 0.11 pts from 54.71%)
|
…ctory#1972) Review follow-ups R1, R2, R5, R6, R7 (olafkfreund/AIFactory plan/2026-10-30-1972-project-scoped-synthetic-key.md): the project id comes from status/source, with the directory name only in the workspaces layout; a keyless envelope is skipped with a warning, not sent; logs carry no ids; stale docs fixed; tests use explicit project ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5j1hQCdA4NmA4jiKDNBX4
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Artifacts (in AIFactory, pre-approved for the 2026-10-30 wave; spec revision 1 from the lead's review): intent · spec · plan.
TFactory's synthetic key was
tf-<spec_id>. Spec ids repeat across projects, so two projects could share one CFactory work item (olafkfreund/AIFactory#1972). It is nowtf-<project_id>:<spec_id>, whereproject_idcomes from the TFactory layoutworkspaces/<project_id>/specs/<spec_id>.One helper,
triager._synthetic_key, is used by both the triager completion key and the hand-back key (handback/send.py), so they cannot drift. The precedence of contract, handoff and<repo>#<n>keys is unchanged.A key over 128 characters logs a warning and becomes
None; it is never truncated. TheNonecase is typed through:CompletionEnvelope.correlation_keyisstr | None,docs_emit_triggerskips the emit, andtfactory_tasksomits the field. These three are the plan's step 4 deviations.Prod (read-only, aggregate, 2026-10-30): 13
tf-work items, newest 2026-10-23, none in flight. No migration needed. The old rows stay as history.Who did the work: plan step 4 was done by the
coderagent (Sonnet) and reviewed by me.Tests:
test_correlation_sync.py(new tests: distinct keys across projects, and over-long givesNone),test_triager_completion_webhook.pyandtest_docs_emit_341.pygive 47 passed.Ratchet:
scripts/ratchet_lint.pypasses with CI's ruff 0.15.17 and mypy 1.20.1.Refs olafkfreund/AIFactory#1972 (fixed by the three PRs together). The AIFactory side is olafkfreund/AIFactory#1978.
Review follow-ups (Opus review): R1–R7 are fixed and recorded in the AIFactory plan (section "Review follow-ups"; spec revision 2). In short:
AIFACTORY_TASK_ID.The follow-ups were done by the
coderagent and reviewed by me.🤖 Generated with Claude Code
https://claude.ai/code/session_01L5j1hQCdA4NmA4jiKDNBX4