Migrating to the physical server

Transitioning to Offline Environments

SLOP1276 · Week 09 · Alex’s story

Fictional Alex drafts an Atrium meeting. The plan fits; then the proposed bill split changes. The old confirmations still describe the old offer.

Investigate: Which version has each person confirmed?

The engineering output

Build an Offline handover plan from the earlier venue and threat records.

Filter hard constraints before ranking preferences.

Record a cost proposal, exact-version confirmations and cancellation.

Enumerate contingencies and challenge the independence assumption.

How this pack fits the week

60 minutes · Monday’s selected lecture slides.

90 minutes · Thursday’s four practical blocks.

About 210 minutes · independent preparation, remaining examples and consolidation.

Timed selections and tasks.

The complete 180-minute route is a resource guide; its break is for a full sitting.

Carry the versions forward

Reuse earlier evidence without silently changing its fixture
Week 5 Library100 min · $14Retain its invitation version through the Week 8 record.
Week 9 Atrium90 min · $14A new proposal version needs its own checks and agreement.
Review clearance does not accept either proposal.

Filter before ranking

Alex: board games, terrible puns, possible relationship.

Friday 5–7 pm · bus · $20 total.

First check public setting, route access, exit, opening interval, transport, total time and budget.

Then compare eligible venues. Unknown required observations fail the hard check.

Include the return journey

Authored Atrium itinerary · all travel fits Friday 17:00–19:00
  1. 17:00Depart
  2. 17:20Arrive · 20 min out
  3. 18:10End · 50 min meeting
  4. 18:30Home · 20 min back
90 minutes used; 30 minutes remain. Each travel leg includes bus, walking and waiting.

Report every rejection

Authored cards · hard constraints precede all preference scores
VenueDecision
Atrium cafePass
Private loftpublic, exit
Gallery cafeopening, time, budget
Annex kioskPass
Unknown required observations also fail. An attractive score cannot repair an exit.

6 minutes. Arrive 17:30; venue opens 17:40. Meet for 70 minutes; return takes 30.

Alex’s cost is $22. The available window ends at 19:00.

What fails? Would leaving ten minutes later fix the complete plan?

Also explain why Loft’s perfect preference scores cannot make it eligible.

Answer · one repair leaves two failures

Gallery initially arrives before opening and returns at 19:10. Cost exceeds $20.

Leaving ten minutes later fixes opening but returns at 19:20; the budget still fails.

Loft fails public setting and exit. It remains excluded.

Annex passes at $20 exactly. Equality is allowed at the hard budget limit.

Access is a supplied requirement

Check the relevant route and exit; do not infer a diagnosis from a profile.

An unknown access observation remains unresolved.

Our public-place and exit checks are course constraints, not safety guarantees.

eSafety: preparing before meeting

Change a preference weight

Eligible venues only · score = w × quiet + lighting
wAtriumAnnexBest
178Annex
21111Tie
31514Atrium
Weights are planning assumptions, not additional facts about Alex's preferences.

Cost arithmetic comes before agreement

Two $6 drinks · Alex's round-trip transport is $2
Alex offers both drinksAlex: $14$12 drinks + $2 transport. Counterpart drinks: $0.
Each covers one drinkAlex: $8$6 drink + $2 transport. Counterpart drink: $6.
Counterpart transport is unknown. Either arrangement requires explicit agreement.

Exercise · state both contributions

4 minutes. Two drinks cost $6 each; Alex’s transport costs $2.

Write each party’s drink contribution under cover-both and split-drinks.

Which total belongs to Alex’s $20 constraint?

Does calculating a split establish that the counterpart accepted it?

Answer · the budget is personal to the case

Cover both: Alex $12 + $2 = $14; counterpart drinks $0.

Split: Alex $6 + $2 = $8; counterpart drink $6.

Counterpart transport remains unknown. The drinks still sum to $12.

Both arrangements are proposals. Paying for a drink creates no obligation to stay or reciprocate.

Specify the minimum useful handover

Minimal fictional proposal · reviewed fields, explicit uncertainty
SpecifyVenue, date, time, cost mode, confirmation point, alternative and cancellation.
Retain locallyProposal version, earlier invitation reference and both actor/version confirmations.
No home address, identity-image upload or payment collection is needed.

Confirm a version, not just “yes”

An authored draft proposes Atrium on Friday 7 May, 17:20–18:10, with confirmation by 16:30.

Each confirmation records actor + current plan version.

Changing place, time or cost clears both confirmations.

The checked alternative is a candidate, not an automatic venue switch.

One actor’s confirmation is insufficient

Supplied event records · no message is sent
  1. draftUnconfirmed plan
  2. proposed← proposal record
  3. proposed← first actor confirms
  4. confirmed← second actor confirms
Both confirmations name the current version. Revision clears them; cancellation stays terminal.

Exercise · revise the bill

6 minutes. Record cover-both at 16:00. Alex confirms 16:10; counterpart confirms 16:20.

At 16:22 revise to split-drinks under a new version.

At 16:24 a confirmation arrives for the old version.

Trace the state, confirmation count and Alex’s proposed total.

Answer · old agreement does not migrate

Initial path: proposed → proposed → confirmed.

Revision: proposed, zero confirmations, Alex’s proposed total $8.

The old-version confirmation fails. Both actors must confirm the new terms.

The report records events locally. It sends no invitation, books no table and collects no payment.

Keep cancellation and expiry explicit

Cancel or decline → cancelled. Every later event leaves that snapshot unchanged.

An unfinished plan observed at time ≥ 16:30 → expired.

Final confirmation at 16:29 is within the window; 16:30 is late.

Confirmation remains withdrawable. Expiry does not schedule a reminder.

Pause for the full route · 10 minutes

For an uninterrupted full-pack session; skip this slide in Monday’s selection.

Keep the proposal version beside the agreement.

Next: your mean journey is fine, and your tail is doing something else.

The average bus is unusually punctual because it is not a bus.

Define two assumed events

Base: $14 and 90 minutes for the new Atrium fixture.

L = late bus: +20 minutes, P(L) = 0.25.

C = closed venue: +$6 and +10 minutes, P(C) = 0.10.

First assume independence. These are invented probabilities and additive consequences.

Multiply along the branch

Independent baseline · multiply along a branch, add disjoint leaves
On time · 0.75Open | on: 0.90 → joint 0.675Closed | on: 0.10 → joint 0.075
Late · 0.25Open | late: 0.90 → joint 0.225Closed | late: 0.10 → joint 0.025
The conditional closure probability is 0.10 in both branches under independence.

Enumerate the complete outcomes

Four authored outcomes · each probability multiplies a complete plan
OutcomePCostMin
On / open0.675$1490
On / closed0.075$20100
Late / open0.225$14110
Late / closed0.025$20120
Probabilities sum to 1. Costs belong to Alex; the inputs are assumptions.

Exercise · compute means and exceedance

7 minutes. Check probability mass sums to one.

Multiply each complete cost and duration by its probability, then add.

Which rows exceed 110 minutes?

Which exceed Alex’s 120-minute window or $20 budget?

Answer · the original numerical contract

Expected cost: $14.60. Expected duration: 96 minutes.

Only late-and-closed exceeds 110 minutes: 2.5%.

No supplied row exceeds 120 minutes or $20. Equality passes.

The four-state table is an exact model calculation, not an estimate from actual journeys.

Additive means use the marginals

K = 14 + 6I(C). T = 90 + 20I(L) + 10I(C).

E(K) = 14 + 6P(C) = 14.60.

E(T) = 90 + 20P(L) + 10P(C) = 96.

I is a 0/1 event indicator. These expectation equations do not require independence between L and C.

A working target is a separate threshold

Keep the event definition beside its threshold
Working target110 minutesReserves ten minutes. A 120-minute outcome misses it.
Hard availability120 minutesFriday 17:00–19:00. Exactly 120 still fits this model.
Likewise, $20 exactly passes the $20 budget. “Exceeds” uses >, not ≥.

A mean does not specify a tail

Expected 96 minutes is not a promise that every outcome finishes in 96.

It is also not a 96% probability.

Here T > 110 occurs only when L and C both occur.

That event depends on their joint distribution, which the two marginals do not uniquely determine.

Exercise · test the exact boundary

4 minutes. Under independence, compare strict time targets 109, 110 and 120 minutes.

Add the probabilities of the rows exceeding each target.

What does an erroneous ≥ comparison report at 110?

State why a $20 outcome passes the budget check.

Answer · equality changes the event

Strict tails: 25% at 109, 2.5% at 110, 0% at 120.

At 110, ≥ wrongly includes the late/open row and reports 25%.

Cost exactly $20 is permitted; cost > $20 is not.

The reference function combines time or budget exceedance. Here no row exceeds the budget.

Replace independence with conditionals

Assume P(C | L) = 0.4, P(C | not L) = 0.

Keep P(L) = 0.25.

P(C) = 0.25 × 0.4 + 0.75 × 0 = 0.10.

MacEwan: conditional probability and independence

Move probability between joint cells

Same marginals: late 25%, closed 10% · different joint cells
OutcomeIndependentDependent
On / open0.6750.750
On / closed0.0750.000
Late / open0.2250.150
Late / closed0.0250.100
Dependent case: P(closed | late) = 0.4; P(closed | on time) = 0.

Exercise · preserve means, recompute the tail

6 minutes. Use the dependent joint cells 0.75, 0, 0.15, 0.10.

Check the closure marginal and both expected values.

Recalculate the >110-minute tail.

Does dependence here establish that lateness causes a venue to close?

Answer · the joint event changes

Closure marginal: 10%. Means: $14.60 and 96 minutes.

The >110-minute tail becomes 10%.

That is four times the earlier tail and 7.5 percentage points larger.

This is an authored joint model. It establishes no causal mechanism.

Same means, different risk of missing the target

P(duration > 110 min) · both models average $14.60 and 96 minutes
Independent
2.5%
Dependent
10.0%
Probability scale: 0–100%. Assumed scenarios, not observed journey rates.

Let the unknown joint probability be q

q = P(L and C), with marginals 0.25 and 0.10.

On/open: 0.65 + q. On/closed: 0.10 − q.

Late/open: 0.25 − q. Late/closed: q.

Every cell must be non-negative. Hence 0 ≤ q ≤ 0.10.

Exercise · reach both endpoints

5 minutes. Find P(C | L) and P(C | not L) when q is 0 and 0.10.

Check both marginals remain unchanged.

Where is independence in this interval?

What range of >110-minute tails can these marginals support?

Answer · marginals leave a range

Conditionals: q/0.25 and (0.10 − q)/0.75.

At q = 0: 0 and 2/15. At q = 0.10: 0.4 and 0.

Independence: q = 0.025, both conditionals 0.10.

The tail can range from 0% to 10% within this binary consequence model.

Change the baseline explicitly

Substitute 100 minutes while retaining the assumed increments.

Durations become 100, 110, 120, 130. Mean: 106 minutes.

Every late case now exceeds 110: 25%, in either dependence scenario.

This is sensitivity using the earlier Library duration, not measured disruption risk for that proposal.

A drink split changes one assumption

Alex’s new base cost is $8.

If the same $6 closure surcharge remains Alex’s responsibility, expected cost is $8.60.

Time and its tail stay unchanged under that assumption.

The surcharge allocation also needs agreement. A cheaper calculation does not confirm revised terms.

A fallback is a conditional plan

The closure branch assumes an available alternative, +$6, +10 minutes, and the same meeting duration.

A second closure, further delays or changed access are omitted.

Annex is prechecked, but changing venue requires a revised proposal and fresh agreement.

The numerical branch does not automatically switch the workflow.

Exercise · challenge the fallback

5 minutes. The alternative adds 25 minutes, or its required public entrance is unavailable.

Recalculate the late-and-closed duration from the 90-minute base.

Which hard check fails in each scenario?

What happens if a suitable revised plan cannot be agreed?

Answer · keep the cancel branch

90 + 20 + 25 = 135 minutes, exceeding Alex’s 120-minute window.

An unavailable required entrance fails access regardless of preference score.

Recheck route, opening interval, budget and exit. Revise and reconfirm if feasible.

Otherwise cancel. “Backup” does not exempt a venue from the constraints.

A fresh review invalidates the agreement

The constructor uses an actual unheld replied Week 8 record.

A new review update clears confirmations; an open finding holds the plan.

Before the confirmation deadline, clearance returns to draft, requiring proposal and confirmation again.

A closed upstream conversation cancels the plan. No later event revives it.

Make the literal tests fail on purpose

Change the target comparison > to ≥: the 110-minute tail test must fail.

Change two confirmations to one: proposed/proposed/confirmed must fail.

Assert each edit matched. Restore and rerun.

Also test complete cancellation snapshots, stale versions, conflicting IDs and exact deadlines.

Run ten local files

Save the ten downloads from the lecture notes together.

Run node week-09-worked-examples.mjs.

The report reuses Week 5 feasibility, Week 6–8 event logic and the existing logistics reference.

It checks two distributions and five handover histories with no external service.

Hand over the current agreement

Week 9 plan → Week 10 conversation and bill model
Carry the agreementCurrent version, both confirmations, cost arrangement and earlier evidence references.
Keep the limitsArrival is not inferred. A cancelled, expired or held plan cannot be exported as accepted.
An agreement to meet does not remove the ability to end the interaction.

Keep the evidence for the final release

Save venue rejections, itinerary, cost agreement, version history, cancel traces and both contingency tables.

These support the final project’s existing validation appendix.

Final project: 50% · 28 May 2027, 5 pm.

Week 10 uses the cost agreement when examining the “Who pays?” deadlock.

Exit ticket · repair three conclusions

“Lighting compensates for a failed exit.” → Hard constraints come first.

“A 96-minute mean makes the tail small.” → Check the joint event.

“Old confirmation covers a changed bill.” → Confirm the new version.

Alex’s confirmed plan is ready to hand over. Arrival is still unobserved. Week 10 opens the meeting record.