Skip to content

Merge LCAM-1282-fix-test-metadata-uuid-fallback - #250

Merged
Dalwin-Barnard merged 4 commits into
sdk_v8_pre_prodfrom
LCAM-1282-fix-test-metadata-uuid-fallback
Sep 29, 2026
Merged

Dalwin-Barnard merged 4 commits into
sdk_v8_pre_prodfrom
LCAM-1282-fix-test-metadata-uuid-fallback

Conversation

@bsautomation

Copy link
Copy Markdown
Contributor

Merge into sdk_v8_pre_prod :by automationbs

Ashish Sharma and others added 4 commits September 28, 2026 20:29
…CAM-1282)

setTestMetadata() is called before the test-run uuid is assigned, so only
fallbackMetadata gets populated and metadataByTestRunUuid stays empty.
testHubModule reads it back with TestMetadata.get(uuid), which has returned
{} since the fallback was removed — so app_lcnc was dropped from the
outgoing TestRun event and App LCA test runs never got linked to TestHub.

A per-uuid lookup now falls back to the current-run metadata only when no
per-uuid metadata has been recorded at all. Once per-uuid tracking is
active, an unknown uuid still returns {}, so one test run's metadata can
never leak into another.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replaces the guarded variant with the exact restore of the clause removed
in aa8898f:

    metadataByTestRunUuid[testRunUuid] || fallbackMetadata || {}

testHubModule calls TestMetadata.reset() after each test completes, and
that is what bounds reuse across runs, so the plain restore is sufficient
and keeps get(uuid) consistent with the no-arg get().

Tests updated to assert the restored semantics, plus a new case covering
that reset() between tests prevents a previous run's metadata being served.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…1282)

The failure this PR fixes was silent end to end: setTestMetadata stored
only the fallback, get(uuid) returned {}, and app_lcnc was omitted from
the event with nothing logged anywhere.

Adds two debug lines, both after the app_lcnc gate so they stay silent
for every other SDK consumer:

  setTestMetadata: identifier=... storedUnderUuid=... store=[...]
  TestMetadata.get: uuid=... identifier=... store=[...]

storedUnderUuid=undefined with store=[] identifies the ordering directly,
and identifier=undefined on the get line is the failure signature.

Also warns when setTestMetadata is called by a non-app_lcnc central user,
which previously returned silently.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bsautomation
bsautomation requested a review from a team as a code owner September 29, 2026 13:21
@bsautomation
bsautomation requested review from 07souravkunda and shivam5643 and removed request for a team September 29, 2026 13:21
@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited), Workspace UI (inherited)

Review profile: ASSERTIVE

Plan: Advanced

Run ID: fe448dc7-d804-470e-9cd2-05b7def7086a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@Dalwin-Barnard
Dalwin-Barnard merged commit 17e6336 into sdk_v8_pre_prod Sep 29, 2026
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants