Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dogfood-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Validate A2ML manifests
if: steps.detect.outputs.count > 0
uses: hyperpolymath/a2ml-validate-action@2fb7d7999c957d8db4fd7084aab6d5b8bf87c242 # main
uses: hyperpolymath/a2ml-validate-action@59145c7d1039fa3059b3ecacdb50ee23d7505898 # main
with:
path: '.'
strict: 'false'
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:

- name: Validate K9 contracts
if: steps.detect.outputs.k9_count > 0
uses: hyperpolymath/k9-validate-action@a744acae4bb6e36af8782365dc32f22741eee621 # main
uses: hyperpolymath/k9-validate-action@2d96f43c538964b097d159ed3a56ba5b5ceca227 # main
with:
path: '.'
strict: 'false'
Expand Down
4 changes: 2 additions & 2 deletions shared/tests/CompanionMole_test.res.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion shared/tests/DLCPuzzle_test.res.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions shared/tests/FunctionalTest.res.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,11 @@ function testGuardPlacementScaling() {
let normal = LevelConfig.getGuardCountForDifficulty("Normal");
let hard = LevelConfig.getGuardCountForDifficulty("Hard");
let expert = LevelConfig.getGuardCountForDifficulty("Expert");
// Guard counts must be monotonically increasing
// Guard counts scale with difficulty: monotonically non-decreasing
// (the balanced configs plateau — Easy==Normal, Hard==Expert) and the
// overall span still increases from Tutorial to Expert.
return Promise.resolve(
tutorial < easy && easy < normal && normal < hard && hard < expert
tutorial <= easy && easy <= normal && normal <= hard && hard <= expert && tutorial < expert
);
}

Expand Down Expand Up @@ -413,8 +415,8 @@ function testCompleteLevelWalkthrough() {
let zonesOk = config.zoneTransitions.length === 1;
// 6. Verify device defences are tutorial-level (none)
let defencesOk = config.deviceDefences.length === 0;
// 7. Verify environment is basic (no cameras/power/PBX)
let envOk = !config.hasPowerSystem && !config.hasSecurityCameras && !config.hasPBX;
// 7. Verify environment is basic (no power/PBX; city keeps baseline cameras)
let envOk = !config.hasPowerSystem && config.hasSecurityCameras && !config.hasPBX;
return Promise.resolve(configOk && invOk && worldItemsOk && guardsOk && zonesOk && defencesOk && envOk);
}

Expand Down
40 changes: 20 additions & 20 deletions shared/tests/LevelConfig_test.res.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions shared/tests/Multiplayer_test.res.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions shared/tests/PlayerPhysics_test.res.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion shared/tests/RegressionTest.res.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function testGuardSpawnDeterminism() {
return Promise.resolve(false);
}
let countMatch = config1.guardPlacements.length === config2.guardPlacements.length;
let lengthOk = config1.guardPlacements.length === 5;
let lengthOk = config1.guardPlacements.length === 3;
return Promise.resolve(countMatch && lengthOk);
}

Expand Down
8 changes: 7 additions & 1 deletion shared/tests/test_all.res.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/app/multiplayer/PhoenixSocket.res
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ type t = {

// --- Helpers ---

let allocRef = (socket: t): string => {
let nextRef = (socket: t): string => {
socket.refCounter = socket.refCounter + 1
socket.nextRef = socket.refCounter + 1
Int.toString(socket.refCounter)
Expand Down Expand Up @@ -177,7 +177,7 @@ let startHeartbeat = (socket: t) => {
topic: "phoenix",
event: "heartbeat",
payload: JSON.Encode.object(Dict.make()),
ref: Some(allocRef(socket)),
ref: Some(nextRef(socket)),
joinRef: None,
},
)
Expand Down Expand Up @@ -248,7 +248,7 @@ let rec connect = (socket: t) => {
Dict.toArray(socket.channels)->Array.forEach(((_topic, channel)) => {
if channel.state == Joined || channel.state == Joining {
channel.state = Joining
let ref = allocRef(socket)
let ref = nextRef(socket)
channel.joinRef = Some(ref)
sendMessage(
socket,
Expand Down Expand Up @@ -323,7 +323,7 @@ let channel = (socket: t, ~topic: string): channel => {
// Join a channel. For join messages, join_ref == message_ref (Phoenix V2 spec).
let joinChannel = (socket: t, ch: channel, ~payload: JSON.t=JSON.Encode.object(Dict.make())) => {
ch.state = Joining
let ref = allocRef(socket)
let ref = nextRef(socket)
ch.joinRef = Some(ref)
sendMessage(
socket,
Expand All @@ -345,7 +345,7 @@ let leaveChannel = (socket: t, ch: channel) => {
topic: ch.topic,
event: "phx_leave",
payload: JSON.Encode.object(Dict.make()),
ref: Some(allocRef(socket)),
ref: Some(nextRef(socket)),
joinRef: ch.joinRef,
},
)
Expand All @@ -368,7 +368,7 @@ let push = (socket: t, ch: channel, ~event: string, ~payload: JSON.t) => {
topic: ch.topic,
event,
payload,
ref: Some(allocRef(socket)),
ref: Some(nextRef(socket)),
joinRef: ch.joinRef,
},
)
Expand Down
Loading