Skip to main content

Qontak One Team Migration — Test Case Gap Analysis (vs. PRD, RFC, Task Breakdown & JIRA)

Generated: 2026-07-21 18:30 WIB (UTC+7) · AUGFLOW-186

Scope analyzed: bifrost/qontak-one-team/testcases/qontak-one-team-migration.md (TC-01–TC-40, 3 duplicate-ID rows) against prds/prd-qontak-one-team-anchor.md + prds/prd-qontak-one-team-migration.md, rfcs/rfc-qontak-one-team.md + rfcs/rfc-qontak-one-team-migration.md + its -review.md and .task-breakdown.md, delivery/timeline.md + delivery/status/*.md, live source in qontak-launchpad (BE) and qontak-launchpad-fe (FE), and JIRA epic BIF-8642 (live state, 2026-07-21).

Status: direct primary-source reads of all initiative docs + git log -p on the testcases file + live grep/read of both code worktrees + one JQL sweep of the epic (18 children) + targeted ticket reads, followed by one adversarial verification pass — a fresh-context subagent instructed to refute every load-bearing claim against the same primary sources, with no visibility into this synthesis. All 7 checked findings were independently confirmed; none were refuted or weakened.


0. Ground truth

Pivot timeline:

  • 2026-06-22 → 2026-06-30: PRD drafted, then corrected pull→push migration model (v1.2). RFC R1 (2026-06-30) HOLD @6.5, capped by invite-casing bug (REV-2) and blocked by undefined Chat/CRM trigger contract (REV-1).
  • 2026-06-30 (same day), R2: REV-2/9/10 fixed in-spec. RFC re-reviewed, still HOLD @6.5 (REV-1 dependency remained).
  • 2026-07-01, R3: Chat+CRM sign off the trigger/TEAM_MIGRATED contract → REV-1 resolved, RFC scores 7.5 PROCEED, Task 5 unblocked.
  • 2026-07-13 → 2026-07-16: Tasks 1–5 (BE) all merge to qontak-launchpad main; status reports track 68%→81%. Parent RFC (rfc-qontak-one-team.md) documents the whole Teams surface as as-built/shipped, including BIF-8801 (Heimdall trigger client).
  • 2026-07-19: BIF-8864/8865/8866 (children-tree, private endpoints, full Kafka coverage) + a new QA ticket (BIF-8911) are reparented onto BIF-8642 from a different, now-closed epic (BIF-7795) — they were not originally Phase-1 migration scope.
  • 2026-07-20: PRD gets an informal dated amendment (§10.2.1, no changelog bump): General team must backfill all existing users + auto-enroll all future users; Launchpad must trigger migration via private Chat/CRM endpoints. Task-breakdown adds unsized Task 7 (backfill) + Task 8 (private trigger). Testcases file is edited the same day (rewrites TC-13/TC-14, adds a new TC-19) — but introduces a duplicate TC-19 id in the process. Jira tickets BIF-8968 (Task 7) and BIF-8969 (Task 8) are filed the same evening.
  • 2026-07-21 (today): BIF-8968 exists as an unmerged branch (commit dfd82ea, status "In Review") that enrolls new users only — no backfill of pre-existing rows. BIF-8969 ("To Do") is externally blocked on Chat/CRM and reveals the Heimdall trigger client (BIF-8801, everywhere described as "shipped") has zero production callers. BIF-8864/65/66 flip to Jira "Done" in the small hours of today — one day after the 2026-07-20 status doc recorded them as "In Deployment."

What's current now: the original Phase-1 scope (OTM-S01/S02/S04/S05 receive-side) is shipped and verified in code. The 2026-07-20 amendment (General backfill + private trigger) is real, PM-approved-in-substance scope, but its engineering delivery is incomplete and partially unowned — the testcases file has already been updated to assert this newer design ahead of the code fully supporting it, and in one place introduced a structural defect (duplicate TC-19) while doing so.


1. Missing test cases

#GapWhy it mattersAnchor
1.1No test case for Launchpad triggering Chat/CRM migration (the outbound call, PRD §9 behavior #5 / OTM-S05). All of TC-28–38 test the receive side (Chat/CRM → Launchpad) only.The outbound trigger is reported "shipped" (BIF-8801, parent RFC §7.6/§11, 2026-07-13 status) but has zero production callers anywhere in qontak-launchpad (verified: git grep TriggerMigration outside tests/mocks = 0 hits). A concrete, currently-non-functional behavior has no coverage at all — testing it would have caught the gap.internal/app/api/chat/trigger_migration.go, internal/app/api/crm/trigger_migration.go; Jira BIF-8969
1.2No test case for the private-trigger-endpoint path (Task 8 / 2026-07-20 amendment) — a distinct requirement from 1.1.Task 8 (BIF-8969) is filed and externally blocked; when it lands there is no TC anywhere ready to validate it.Task-breakdown Task 8; Jira BIF-8969

2. Test cases that exist but are incomplete or now assert the wrong thing

TC rangeStoryProblem
TC-11OTM-S01/ERR-1Expects 400 + EN "Invalid request" for a cross-tenant teamId. Code returns consts.ErrForbidden for team.CompanyID != inviterInfo.CompanyID (sso_invite.go:132-134), which writer.go's mappingError maps to HTTP 403, EN "You are not authorized" (default_error.go:47-56). Wrong status code and wrong message.
TC-12OTM-S01/ERR-1Expects 400 + EN "Invalid request" for a malformed teamId. Code returns consts.ErrParseUUID("team_id") — a fresh fmt.Errorf, not a sentinel (consts/error.go:22-24) — so mappingError's switch has no matching case and falls to defaultHTTP 422, message literally "invalid team_id". Wrong status code and wrong message.
TC-19 (×2)OTM-S02 vs OTM-S03Duplicate TC-ID. The 2026-07-20 commit (ff101af) added a new row "Every future user is automatically added to General" under TC-19 without renumbering the pre-existing OTM-S03 row "Team management page renders at /launchpad/team..." (also TC-19). Violates the template's sequential/non-renumbered TC-ID contract. Confirmed via git show ff101af and the pre-commit blob.
TC-19(orig)/20/21/22/23OTM-S03All test /launchpad/team and /qontakcrm/team. Both routes are confirmed absent from both launchpad repos (grep -rn "qontakcrm/team|launchpad/team" app/ = 0 hits; real route is /user_management/teams) — matching the RFC's own "material grounding delta" and Task 6's "blocked / out of repo" status. These TCs currently cannot pass against either repo under test; they need to move with whatever owns the eventual redirect (still unconfirmed — RFC OQ-3/REV-8) or be explicitly marked out-of-scope-here rather than left looking like in-scope, failing cases.

3. Gaps in the implementation (test cases/stories exist, engineering hasn't fully covered them)

#FindingEvidence
3.1TC-13 ("Existing user is backfilled into General... rerunning the backfill creates no duplicate membership") asserts a backfill of pre-existing users. The only related work, BIF-8968 (commit dfd82ea, unmerged branch origin/BIF-8968-...), wires EnrollUserInGeneralTeam into 8 creation-time call sites only (SsoInvite, provisionExistingSSOUser, Migrate, MigrateUser, CreateFromApp, CreateConsultant, company/owner enrollment) — the diff contains zero occurrences of "backfill" and no job/migration touching rows that already exist. The ticket's own "Open questions" section literally marks this "UNKNOWN — in scope?". This is a genuine, currently unowned implementation gap, not just a stale test.
3.2No engineering task/ticket in the BIF-8642 sweep covers invoking the Chat/CRM trigger client from the actual migration flow. BIF-8801 (marked Done) built only the client; git grep -n TriggerMigration across the whole repo (incl. cmd/) returns only the interface + implementation + _test.go files — zero non-test callers. BIF-8969 (Task 8) is scoped to fix this but is externally blocked on Chat/CRM delivering a corrected contract, so the gap has no near-term owner.

4. Test cases available, PRD/RFC needs update

#SectionWhat's staleStatus of the fix
4.1PRD §10.2.1 "Membership and trigger amendment — 2026-07-20"Real content superseding OTM-S01/AC-1, OTM-S02/AC-1/AC-2/ERR-1, OTM-S05/AC-1..4 — but landed as an inline dated amendment, not a versioned entry.Partially/informally landed — content exists, but the PRD CHANGELOG table still ends at v1.3 (2026-06-30) with no v1.4 row; downstream tracking still treats this as an untracked change.
4.2rfc-qontak-one-team-migration.md §5 (Concerns) and §7 (Ready for agent execution)Body prose still reads OQ-1/OQ-2/OQ-4 as open blockers and states "no — blocked on cross-squad contracts," even though the RFC's own frontmatter says status: approved/"cleared at R3 (PROCEED, 7.5) 2026-07-01" and the companion review confirms REV-1 resolved.Fully open — this is technically an RFC (not PRD) currency gap, outside the skill's strict Category-4 scope, but flagged here because it actively misleads a reader of the RFC body alone.

What does not need an update: the core OTM-S01/S02/S04/S05 PRD sections (§7–10, feature/API behavior as originally specified) remain accurate against shipped code — verified independently: teamIds wiring (FE+BE), source_identifier/reference_id columns + CHECK constraint, General-team auto-create with correct casing and non-fatal+retry policy, and the migrate-mode bulk-create/idempotency/TEAM_MIGRATED receive path all match the PRD as written.


5. Open items for you to weigh in on

  1. Is a backfill-of-existing-users job still planned for Task 7, or was the scope quietly narrowed to "future users only" when BIF-8968 was built? No ticket in the epic covers it. Recommend confirming with Grehasta/PM before treating TC-13 as coverable by the current BIF-8968 branch.
  2. Status-doc / Jira mismatch: delivery/status/2026-07-20.md records BIF-8864/8865/8866 as "In Deployment" and BIF-8911 as "To Do." Current Jira shows BIF-8864/65/66 all Done (transitioned ~00:42–00:43 today, 2026-07-21) while BIF-8911 — the QA ticket verifying them — is still To Do. The status doc is one day stale; flagging for reconciliation rather than picking a side, since the underlying question ("is QA on 8864/65/66 actually done?") isn't resolved by either source.
  3. BIF-8969 (Task 8) has no ETA — it's externally blocked on Chat/CRM. Given the parent RFC and 2026-07-13 status report already describe the trigger as "shipped" in language that could read as end-to-end-complete, worth a direct call on how future status reports phrase this so "shipped" doesn't overstate actual migration automation to stakeholders.
  4. The four Story-level tickets (BIF-8756/8795/8796/8797) all sit in "Waiting Confirmation" (pending PO sign-off) even though every child Task under them is Done — not itself a testcase-drift finding, but worth a quick PM/PO check on whether that confirmation step is still pending or just hasn't been transitioned in Jira.

Traceability matrix

StoryJira StoryTCsVerdict
OTM-S01BIF-8756 (Waiting Confirmation)TC-01–13, 39, 40Shipped, mostly matches; TC-11/TC-12 now-wrong (§2)
OTM-S02BIF-8795 (Waiting Confirmation)TC-14–18, new TC-19Core (new-CID) shipped; backfill scope has an implementation gap (§3.1); duplicate TC-19 id (§2)
OTM-S03(none — out of repo, Task 6)orig TC-19, 20–23Untestable against these two repos (§2); PRD/ANCHOR still list Must-Have, unreconciled (RFC-flagged REV-8/OQ-3)
OTM-S04BIF-8796 (Waiting Confirmation)TC-24–27Full match, verified in code
OTM-S05BIF-8797 (Waiting Confirmation)TC-28–38Receive-side full match; trigger-initiation side has zero TCs and zero production callers (§1.1, §3.2)

Verification note

One adversarial verification pass ran (Step 4), as a fresh-context subagent with no visibility into this synthesis — only the 7 load-bearing claims plus the source file paths, instructed explicitly to try to refute them. All 7 were independently re-derived and confirmed against primary evidence (exact file:line quotes for the code claims, git show/git merge-base output for the commit/branch claims, and a direct RFC frontmatter-vs-body quote for the currency claim). No finding was corrected, weakened, or contradicted by the second pass; nothing was added beyond what's already listed above.