Bite 30L.4A — Manual Promotion Test Suite - RodrigoMattosoSilveira/EnterpriseRemoteSystems GitHub Wiki

Bite 30L.4A — Manual Promotion Test Suite

Delivery: 30L.4A — Coverage Closure & Local Promotion Gate
Branch: 828-30L.4a
SHA: 90f03393d313e0ed51bb871a80099f6036ac9671

Scope of This Manual Suite

30L.4A adds:

  1. the final missing same-Global-Person cross-Tenant financial-isolation E2E proof;
  2. a machine-checked Bite 30L coverage manifest;
  3. coverage-manifest verification as part of make local-check.

The coverage manifest and make local-check gate are already fully machine-verifiable and passed in LOCAL and CI.

Therefore, only one manual UI test is recommended before promotion:

Verify that one Authentication Account / one Global Person can participate independently in Tenant A and Tenant B, and that switching Tenant context never leaks the other Tenant's Collaborator Journey or financial activity through the UI or browser cache.


Promotion Prerequisites

Before starting this manual test:

  • make local-check passes.
  • CI passes.
  • The committed HEAD being tested is:
90f03393d313e0ed51bb871a80099f6036ac9671
  • No uncommitted application changes are present.

Verify:

git rev-parse HEAD
git status --short

Expected HEAD:

90f03393d313e0ed51bb871a80099f6036ac9671

Important 30L.4A Coverage-Manifest Expectation

Before 30L.4B and 30L.4C are implemented, this command:

make bite30l4-coverage-manifest-check

is expected to report:

Bite 30L.4 coverage manifest verified: 12/13 requirements covered; pending requirements: [13].

This is PASS behavior for 30L.4A.

Do not require:

python3 scripts/verify-bite30l4-coverage-manifest.py --require-complete

to pass yet.

Requirement 13 is intentionally reserved for:

30L.4B — Deployed Development/Test Verification Evidence
30L.4C — Production Release-Gate Evidence

Manual Test Environment

Use a dedicated manual database so this test starts from deterministic fixtures.

Terminal 1 — Backend

Stop any existing backend completely.

From the repository root run:

ERS_DATABASE_PATH=data/manual-30l4a.db \
ERS_RESET_DATABASE=true \
ERS_PROVISION_E2E_ADMIN=true \
AUTHZ_BOOTSTRAP_ENABLED=false \
[email protected] \
E2E_ADMIN_PASSWORD='Local-E2E-Administrator-28D!' \
E2E_TENANT_ADMIN_PASSWORD='Local-E2E-Administrator-28D!' \
make local-backend

Leave this terminal running.

Terminal 2 — Frontend

Run:

make local-frontend

Leave this terminal running.


Deterministic Manual Identities

Use three independent browser profiles/windows.

Do not reuse the same browser profile for different accounts.

Browser Identity Login Password Required Tenant
Browser A Tenant A Administrator [email protected] Local-E2E-Administrator-28D! E2E Multi Tenant A
Browser B Tenant B Administrator [email protected] Local-E2E-Administrator-28D! E2E Multi Tenant B
Browser C Shared multi-Tenant Person [email protected] Local-E2E-Administrator-28D! Switches between A and B

Shared Global Person

Nickname: E2E Multi Tenant Person
Person ID: e2e-multi-tenant-person
Account ID: e2e-multi-tenant-account

Tenant A

Name: E2E Multi Tenant A
Tenant ID: e2e-multi-tenant-a

Actor:
e2e-multi-tenant-actor-e2e-multi-tenant-a

Membership:
e2e-multi-tenant-membership-e2e-multi-tenant-a

Tenant B

Name: E2E Multi Tenant B
Tenant ID: e2e-multi-tenant-b

Actor:
e2e-multi-tenant-actor-e2e-multi-tenant-b

Membership:
e2e-multi-tenant-membership-e2e-multi-tenant-b

Test 01 — Same Global Person Cross-Tenant Financial Isolation

Objective

Verify through the application UI that:

  1. the same Global Person has a separate active Membership and Collaborator Journey in Tenant A and Tenant B;
  2. Tenant A financial activity is visible only while operating through Tenant A;
  3. Tenant B financial activity is visible only while operating through Tenant B;
  4. switching A → B → A does not expose stale financial data from the previously selected Tenant;
  5. switching Tenant does not require another login;
  6. the same Authentication Account resolves to the exact Tenant Actor and Membership for the selected Tenant.

Test 01.1 — Create the Tenant A Collaborator Journey

Identity

Use Browser A.

Sign in as:

[email protected]

Password:

Local-E2E-Administrator-28D!

Required Tenant Context

√ Confirm the top-bar Tenant selector shows:

E2E Multi Tenant A

Do not continue if the selected Tenant is anything else.

Navigation

Use the application UI:

Collaborators

Click:

Add

The page heading must be:

New Collaborator

Select the Person

Locate:

Find eligible Person by nickname

Enter:

E2E Multi Tenant Person

Select the matching Person.

Expected Result

The application must identify the Person as eligible.

Confirm that the selected Person is complete and can be used to create a Collaborator Journey.

If the Person is reported as incomplete or unavailable, BLOCK PROMOTION.

Journey Values

Enter/select:

Journey Start Date: today's date
Status: Active
Sector: Mining
Location: Main Mine
Task: Miner
Payment Method: Daily wage
Payment Value: 250.75

In Notes, enter exactly:

30L4A manual Tenant A journey

Click:

Create Collaborator

Expected Result

√ The application returns to the Collaborators page and reports successful creation.

Locate:

E2E Multi Tenant Person

Open the new Collaborator Journey.

Record:

Tenant A Collaborator Journey ID:
________________________________________

PASS Criteria

  • Journey is created successfully.
  • Tenant remains E2E Multi Tenant A.
  • Person is E2E Multi Tenant Person.
  • Journey is Active.
  • No Tenant B information is displayed.

Promotion Blockers

  • Shared Person is not eligible despite the deterministic COMPLETE profile.
  • Creation fails with Person profile must be complete.
  • Tenant B Membership or Tenant B Journey information is displayed.

Test 01.2 — Create a Distinct Tenant A Financial Marker

Remain signed in to Browser A as the Tenant A Administrator.

Confirm the selected Tenant remains:

E2E Multi Tenant A

Navigation

Use the application UI:

Expenses

Click:

Create Expense

Collaborator

In the Collaborator search enter:

E2E Multi Tenant Person

Select the active Collaborator created in Test 01.1.

Expense Values

Set:

Category: Canteen
Expense Date: today's date
Item Description: Water bottle
Currency: Real / BRL
Quantity: 1

In Notes, enter exactly:

30L4A-MANUAL-TENANT-A

Click:

Create Expense

Expected Result

√ The application reports that the Expense was created.

Record:

Tenant A financial marker:
30L4A-MANUAL-TENANT-A

PASS Criteria

  • Expense is created successfully.
  • Expense belongs to E2E Multi Tenant A.
  • No Tenant B data appears.

Test 01.3 — Create the Tenant B Collaborator Journey

Identity

Use Browser B.

Sign in as:

[email protected]

Password:

Local-E2E-Administrator-28D!

Required Tenant Context

Confirm the top-bar Tenant selector shows:

E2E Multi Tenant B

Do not continue if another Tenant is selected.

Navigation

Use:

Collaborators

Click:

Add

Select the Person

In:

Find eligible Person by nickname

enter:

E2E Multi Tenant Person

Select the matching Person.

Important Expected Result

The Person must still be eligible in Tenant B even though the same Global Person already has an active Collaborator Journey in Tenant A.

This verifies that Collaborator eligibility is scoped through the Tenant-specific Membership.

Journey Values

Enter/select:

Journey Start Date: today's date
Status: Active
Sector: Mining
Location: Main Mine
Task: Miner
Payment Method: Daily wage
Payment Value: 250.75

In Notes, enter:

30L4A manual Tenant B journey

Click:

Create Collaborator

Record:

Tenant B Collaborator Journey ID:
________________________________________

PASS Criteria

  • Tenant B Journey is created successfully.
  • Creating the Tenant A Journey did not make the Person ineligible in Tenant B.
  • Tenant B has its own distinct Collaborator Journey ID.
  • Tenant A Collaborator information is not exposed.

Promotion Blockers

  • Tenant A Journey prevents legitimate Tenant B Journey creation.
  • Tenant A Membership data appears while operating in Tenant B.
  • Tenant A and Tenant B resolve to the same Collaborator Journey ID.

Test 01.4 — Create a Distinct Tenant B Financial Marker

Remain in Browser B.

Confirm:

Current Tenant: E2E Multi Tenant B

Navigation

Use:

Expenses → Create Expense

Collaborator

Search for:

E2E Multi Tenant Person

Select the Tenant B Collaborator created in Test 01.3.

Expense Values

Set:

Category: Canteen
Expense Date: today's date
Item Description: Water bottle
Currency: Real / BRL
Quantity: 1

In Notes, enter exactly:

30L4A-MANUAL-TENANT-B

Click:

Create Expense

Expected Result

Expense creation succeeds.

Record:

Tenant B financial marker:
30L4A-MANUAL-TENANT-B

Test 01.5 — Sign In as the Shared Authentication Account

Identity

Use Browser C.

Sign in as:

[email protected]

Password:

Local-E2E-Administrator-28D!

Do not sign out during the remainder of this test.


Test 01.6 — Verify Both Tenant Identities Are Available

Open the top-bar:

Tenant

selector.

Expected Result

The selector must show exactly the two deterministic Tenant identities:

E2E Multi Tenant A
E2E Multi Tenant B

For Tenant A, confirm the selector shows provenance corresponding to:

Actor:
e2e-multi-tenant-actor-e2e-multi-tenant-a

Membership:
e2e-multi-tenant-membership-e2e-multi-tenant-a

For Tenant B, confirm:

Actor:
e2e-multi-tenant-actor-e2e-multi-tenant-b

Membership:
e2e-multi-tenant-membership-e2e-multi-tenant-b

PASS Criteria

  • Exactly two Tenant choices are available.
  • Tenant A has its own Actor and Membership.
  • Tenant B has its own Actor and Membership.
  • No new login is required to switch between them.

Promotion Blockers

  • Only one Tenant is available.
  • Both Tenant options show the same Membership.
  • Both Tenant options show the same Tenant Actor.
  • Selecting a Tenant requires signing in again.

Test 01.7 — Verify Tenant A Current Account Isolation

In Browser C, use the Tenant selector and explicitly select:

E2E Multi Tenant A

Confirm the top bar now shows:

E2E Multi Tenant A

Navigation

Use:

Collaborators

Because this is the Person's own account, the page should identify the journeys as the signed-in Person's own Journey history.

Expected Result

The visible Journey belongs to the Tenant A Membership and is the Tenant A Journey recorded earlier.

Open the E2E Multi Tenant Person Journey.

Click:

Current Account

The page heading must be:

Person Current Account

Financial Assertions

Confirm the page contains:

30L4A-MANUAL-TENANT-A

Confirm the page does not contain:

30L4A-MANUAL-TENANT-B

Confirm the selected Tenant remains:

E2E Multi Tenant A

Record:

Tenant A marker visible:
[x] YES
[ ] NO

Tenant B marker visible:
[ ] YES
[x] NO

PASS Criteria

  • Tenant A marker is visible.
  • Tenant B marker is absent.
  • Current Account belongs to the Tenant A Collaborator Journey.
  • No Tenant B Journey or financial data is displayed.

Promotion Blockers

  • Tenant B marker appears.
  • Tenant B Collaborator Journey appears.
  • Current Account request results in Access forbidden for the correct Tenant A Journey.
  • Current Account shows mixed Tenant provenance.

Test 01.8 — Switch to Tenant B Without Signing Out

Remain signed in to Browser C.

Do not sign out.

Open the top-bar Tenant selector.

Select:

E2E Multi Tenant B

Expected Result

The workspace changes Tenant without another authentication prompt.

Confirm:

Current Tenant: E2E Multi Tenant B

Navigation

Use:

Collaborators

Open the E2E Multi Tenant Person Journey visible in Tenant B.

Click:

Current Account

Financial Assertions

Confirm the page contains:

30L4A-MANUAL-TENANT-B

Confirm the page does not contain:

30L4A-MANUAL-TENANT-A

Record:

Tenant B marker visible:
[x] YES
[ ] NO

Tenant A marker visible:
[ ] YES
[x] NO

PASS Criteria

  • Tenant B marker is visible.
  • Tenant A marker is absent.
  • Tenant B uses the Tenant B Collaborator Journey recorded earlier.
  • No sign-in was required during the switch.
  • No stale Tenant A financial data remains on screen.

Promotion Blockers

  • Tenant A marker remains visible after switching.
  • Tenant A Journey appears in Tenant B.
  • Tenant switch requires another login.
  • Cached Tenant A data remains visible while Tenant B is selected.
  • Correct Tenant B Current Account returns Access forbidden.

Test 01.9 — Switch Back to Tenant A and Verify Cache Isolation

Remain signed in to Browser C.

Open the Tenant selector.

Select:

E2E Multi Tenant A

Do not sign out and do not refresh the browser manually before continuing.

Navigation

Use:

Collaborators

Open the Tenant A E2E Multi Tenant Person Journey.

Click:

Current Account

Expected Result

The page again contains:

30L4A-MANUAL-TENANT-A

and does not contain:

30L4A-MANUAL-TENANT-B

Why This Step Matters

This is the manual browser-cache regression check.

The sequence has now been:

Tenant A
→ Tenant B
→ Tenant A

in one authenticated browser session.

The application must re-resolve the selected Tenant and its financial data each time rather than displaying stale React Query/browser state from the previously selected Tenant.

PASS Criteria

  • Tenant A marker returns.
  • Tenant B marker disappears.
  • Tenant A Collaborator Journey is restored correctly.
  • No manual browser refresh is required.
  • No second login is required.
  • No stale Tenant B financial content remains.

Promotion Blockers

  • Tenant B marker remains visible.
  • Current Account shows mixed A/B entries.
  • Wrong Collaborator Journey is displayed.
  • Switching back requires another login.
  • A hard refresh is required before correct Tenant A data appears.

Test 01 — Final PASS Criteria

Mark Test 01 PASS only if every statement below is true.

  • The shared Global Person is eligible for an independent Collaborator Journey in Tenant A.
  • The same Global Person remains eligible for a separate Collaborator Journey in Tenant B.
  • Tenant A and Tenant B use distinct Membership IDs.
  • Tenant A and Tenant B use distinct Tenant Actor IDs.
  • Tenant A and Tenant B use distinct Collaborator Journey IDs.
  • Tenant A financial marker is visible only in Tenant A.
  • Tenant B financial marker is visible only in Tenant B.
  • Tenant switching requires no new login.
  • A → B switching does not leak Tenant A financial data.
  • B → A switching does not leak Tenant B financial data.
  • No stale browser/cache data is visible after either switch.
  • No unexpected Access forbidden occurs for the correctly selected Tenant's own Current Account.
  • No unexpected 500/Internal Server Error occurs.
  • No wrong-Tenant Person, Membership, Collaborator, or financial record is visible.

Promotion-Blocking Conditions

Do not promote 30L.4A if any of the following occurs:

  • the deterministic shared Person is incomplete or cannot create a Collaborator;
  • one Tenant's existing Collaborator Journey prevents creation of the other Tenant's legitimate Journey;
  • Tenant A exposes Tenant B Membership information;
  • Tenant B exposes Tenant A Membership information;
  • Tenant A and Tenant B resolve to the same Collaborator Journey;
  • Tenant A financial activity is visible while Tenant B is selected;
  • Tenant B financial activity is visible while Tenant A is selected;
  • switching Tenant requires reauthentication;
  • stale financial data survives a Tenant switch;
  • correct data appears only after a hard browser refresh;
  • the correct Tenant's Current Account returns Access forbidden;
  • any unexpected 500/Internal Server Error occurs.

Manual Promotion Result

Bite 30L.4A Manual Promotion Result:

[ ] PASS — ready to promote 30L.4A
[ ] FAIL — promotion blocked

Branch:
828-30L.4a

Tested SHA:
90f03393d313e0ed51bb871a80099f6036ac9671

Tenant A Collaborator Journey ID:
________________________________________

Tenant B Collaborator Journey ID:
________________________________________

Tenant A financial marker:
30L4A-MANUAL-TENANT-A

Tenant B financial marker:
30L4A-MANUAL-TENANT-B

Tester:
________________________________________

Date/time:
________________________________________

Notes / defects:
________________________________________
________________________________________
________________________________________

Manual-Test Scope Not Repeated

No separate manual test is required for the following 30L.4A mechanics because they are deterministic machine gates and have already passed LOCAL and CI:

Coverage-manifest schema/content validation
Manifest evidence-file existence
Manifest Playwright-title verification
Manifest Make-target verification
make local-check integration

For this delivery, the expected manifest state remains:

12/13 requirements covered
Requirement 13 pending 30L.4B / 30L.4C

That is not a promotion blocker for 30L.4A.

Glossary Impact

Glossary impact: none