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
6 changes: 3 additions & 3 deletions contracts/barc-stock-queue-v1/contract.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"owner": "FS-GG/HighBarV3",
"consumer": "FS-GG/FSBarV2",
"stockEngine": {
"sourceCommit": "2639eedac7d1fd67d793ec93ebd27f014f336a14",
"headlessSha256": "e4f63c1a391f9ddfbb4d1da225d9533b1d56c65133687d036422a7380c84e833",
"release": "2025.06.19"
"sourceCommit": "de69361239d8c8b1012dba3f5aa3122954ea4da3",
"headlessSha256": "651d6dca67ad99fde1a593d57eede0dfee167e200558988f154ad2bac1cfce21",
"release": "2026.07.04"
},
"profiles": {
"legacy": {
Expand Down
24 changes: 24 additions & 0 deletions docs/roadmaps/barc-01-useful-play.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,30 @@ The stock queue observation contract reports the actual fields supported by the

The linked custom atomic-replacement experiment remains optional and open, with its all-or-none nonempty replacement, cancellation/refund, synchronized fence and independent peer proof requirements unchanged. Its native 0/6 and preserved custom artifacts are not stock acceptance. BARC-01.5 stock useful-play acceptance also remains open until new exact-profile local/generated pointer, keyboard and imported-module native journeys pass.

## Selected stock engine update — 2026-10-02

The owner selected unmodified Recoil **2026.07.04**, upstream source
`de69361239d8c8b1012dba3f5aa3122954ea4da3`, to replace 2025.06.19 for the
next product candidate. Official amd64 Linux archive SHA-256:
`9824c2c38124e4b90a9b5f7c4e7200c3ea6503c0bd4bff0e0ff46212ec29dcab`;
extracted headless SHA-256:
`651d6dca67ad99fde1a593d57eede0dfee167e200558988f154ad2bac1cfce21`.
The separate candidate installation actually reports
`spring-headless version 2026.07.04 (Headless)`.

The [upstream headless atlas guard](https://github.com/beyond-all-reason/RecoilEngine/blob/de69361239d8c8b1012dba3f5aa3122954ea4da3/rts/Rendering/Textures/TextureRenderAtlas.cpp#L389)
addresses the retry function found in the failed old-engine attempt. An actual
successor run must establish its local effect; acquisition and version checks
alone do not close the atlas incident, Lua errors, Count1 or native useful play.

The producer pin, closed version tuple, stock trace and build source pin must
agree with the consumer contract and native catalogue readiness. Historical
2025.06.19 attempts and hash-algorithm vectors stay unchanged. Source adoption
precedes a freshly joined plugin/engine/private-runtime candidate; installed
old packets never become new-engine evidence. The stock tactical wire revision
and factory/queue promises are unchanged, and useful-play acceptance remains 0/6.
See the [qualification plan](https://github.com/FS-GG/.github/blob/main/docs/roadmaps/2026-10-02-bar-headless-infolog-qualification.md).

## Current frontier — 2026-10-01

Selected product profile: unmodified Recoil2025.06.19 plus the ABI-matched HighBar plugin and bounded synced Lua queue observer. Delivered default source heads are HighBar `f08555372168cd911f438de0be5ec2898fd1cfb5` and FSBar `6b9139e83334da903ea6861adb57d97578af2239`; neither source merge establishes installation or gameplay acceptance. The existing custom FR1–FR6 experiment remains optional, inactive and open.
Expand Down
2 changes: 1 addition & 1 deletion tests/Broker.NativeProof/LiveHost.fs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ module LiveHost =
let catalogue = LiveControl.latestTacticalCatalogue state |> Option.defaultWith(fun () -> invalidOp "stock readiness lost its complete catalogue")
let tactical = stockSelection |> Option.map(fun selection -> selection.Tactical) |> Option.defaultWith(fun () -> invalidOp "stock readiness lost its retained factory selection")
if capabilities.Profile<>profile || capabilities.Revision<>2u then invalidOp "stock readiness requires exact profile revision 2"
if List.isEmpty catalogue || catalogue |> List.exists(fun page -> page.TacticalProfile<>profile || page.TacticalRevision<>2u || not page.Complete || page.CatalogueId.Length<>16 || page.CatalogueRevision=0UL || page.Content |> ValueOption.exists(fun content -> content.EngineVersion="2025.06.19" && not(String.IsNullOrWhiteSpace content.GameName) && not(String.IsNullOrWhiteSpace content.GameVersion) && content.GameContentSha256.Length=32) |> not) then invalidOp "stock readiness requires complete current catalogue/content identity"
if List.isEmpty catalogue || catalogue |> List.exists(fun page -> page.TacticalProfile<>profile || page.TacticalRevision<>2u || not page.Complete || page.CatalogueId.Length<>16 || page.CatalogueRevision=0UL || page.Content |> ValueOption.exists(fun content -> content.EngineVersion="2026.07.04" && not(String.IsNullOrWhiteSpace content.GameName) && not(String.IsNullOrWhiteSpace content.GameVersion) && content.GameContentSha256.Length=32) |> not) then invalidOp "stock readiness requires complete current catalogue/content identity"
if tactical.Basis |> ValueOption.exists(fun basis -> basis.Token.Length>0 && basis.MatchIncarnation.Length=16 && basis.StateSequence>0UL && basis.SnapshotSendMonotonicNs>0UL) |> not || tactical.CatalogueId.Length<>16 || tactical.CatalogueRevision=0UL || tactical.Actors.Count=0 then invalidOp "stock readiness requires current basis, catalogue and actor metadata"
let queues=tactical.Actors |> Seq.collect(fun actor -> actor.Queue) |> Seq.toArray
if queues.Length=0 || queues |> Seq.exists(fun queue -> int queue.EvidenceScheme<>2) then invalidOp "stock readiness requires queue evidence scheme 2"
Expand Down
2 changes: 1 addition & 1 deletion tests/Broker.NativeProof/stock-native-trace.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function computeStockRevision(context,rows){
}

const validateBasis=value=>{exactKeys(value,["token","stateSequence","frame","matchIncarnation","processIncarnation","stateChannelIncarnation","snapshotSendMonotonicNs","effectiveCadenceFrames"],"native basis");insist(canonicalBase64(value.token,1,64)&&decimal(value.stateSequence,{positive:true})&&uint32(value.frame)&&canonicalBase64(value.matchIncarnation,16,16)&&nonempty(value.processIncarnation)&&nonempty(value.stateChannelIncarnation)&&decimal(value.snapshotSendMonotonicNs,{positive:true})&&Number.isInteger(value.effectiveCadenceFrames)&&value.effectiveCadenceFrames>0&&value.effectiveCadenceFrames<=0xffffffff,"native basis is incomplete")};
const validateContext=value=>{exactKeys(value,["profile","tacticalRevision","queueEvidenceScheme","actor","catalogueId","catalogueRevision","engineVersion","gameName","gameVersion","contentSha256","domain"],"stock context");exactKeys(value.actor,["id","lifetime"],"stock actor");insist(value.profile==="barc-live-tactical-stock-v1"&&value.tacticalRevision===2&&value.queueEvidenceScheme===2&&decimal(value.actor.id)&&BigInt(value.actor.id)<=31999n&&decimal(value.actor.lifetime,{positive:true})&&canonicalBase64(value.catalogueId,16,16)&&decimal(value.catalogueRevision,{positive:true})&&value.engineVersion==="2025.06.19"&&nonempty(value.gameName)&&nonempty(value.gameVersion)&&sha256.test(value.contentSha256)&&["production","rally"].includes(value.domain),"stock context identity changed")};
const validateContext=value=>{exactKeys(value,["profile","tacticalRevision","queueEvidenceScheme","actor","catalogueId","catalogueRevision","engineVersion","gameName","gameVersion","contentSha256","domain"],"stock context");exactKeys(value.actor,["id","lifetime"],"stock actor");insist(value.profile==="barc-live-tactical-stock-v1"&&value.tacticalRevision===2&&value.queueEvidenceScheme===2&&decimal(value.actor.id)&&BigInt(value.actor.id)<=31999n&&decimal(value.actor.lifetime,{positive:true})&&canonicalBase64(value.catalogueId,16,16)&&decimal(value.catalogueRevision,{positive:true})&&value.engineVersion==="2026.07.04"&&nonempty(value.gameName)&&nonempty(value.gameVersion)&&sha256.test(value.contentSha256)&&["production","rally"].includes(value.domain),"stock context identity changed")};
const validateQueue=(value,context,response)=>{exactKeys(value,["revision","entries"],"stock queue");insist(decimal(value.revision,{positive:true})&&Array.isArray(value.entries)&&value.entries.length<=64,"stock queue bound changed");let params=0;for(const entry of value.entries){exactKeys(entry,["id","codedOptions","tag","float32params"],"stock queue entry");insist(int32(entry.id)&&Number.isInteger(entry.codedOptions)&&entry.codedOptions>=0&&entry.codedOptions<=65535&&int32(entry.tag)&&Array.isArray(entry.float32params)&&entry.float32params.length<=16&&entry.float32params.every(finiteBits),"stock queue entry changed");params+=entry.float32params.length}insist(params<=256,"stock queue parameter bound changed");const expanded=value.entries.map(entry=>({domain:context.domain,...entry}));insist(equal(expanded,response.rows)&&value.revision===computeStockRevision(context,expanded),"stock queue response or scheme2 revision changed")};
const validateDispatch=value=>{exactKeys(value,["brokerSessionId","commandChannelIncarnation","batchSequence","correlationId","commandIndex","authorityEpoch","moduleSha256","moduleGeneration","expectedQueueRevision","matched"],"stock dispatch");insist(canonicalBase64(value.brokerSessionId,16,16)&&nonempty(value.commandChannelIncarnation)&&decimal(value.batchSequence,{positive:true})&&decimal(value.correlationId,{positive:true})&&uint32(value.commandIndex)&&decimal(value.authorityEpoch,{positive:true})&&sha256.test(value.moduleSha256)&&decimal(value.moduleGeneration,{positive:true})&&decimal(value.expectedQueueRevision,{positive:true})&&typeof value.matched==="boolean","stock dispatch identity changed")};

Expand Down
17 changes: 12 additions & 5 deletions tests/Broker.NativeProof/stock-native-trace.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ import { computeStockRevision, joinStockFinalRead, materializeStockHandoff, norm
const request="BARC_QUEUE_REQUEST/1\nlength=00000101\nbridge=barc-stock-queue-reader-v1\ndomain=production\nunit=42\nend\n";
const response="BARC_QUEUE_RESPONSE/1\nlength=00000244\nbridge=barc-stock-queue-reader-v1\nrequest-sha256=b01b44c1eaea587730eae794c0b87e4e05dddecfb508abd295ac1e138a0f5960\nstatus=ok\ndomain=production\nunit=42\ncount=1\nrow=production|-710|32|41|3f800000,80000000\nend\n";
const catalogueId=Buffer.from(Array.from({length:16},(_,index)=>index)).toString("base64"),matchId=Buffer.from(Array.from({length:16},(_,index)=>index+16)).toString("base64");
const context=()=>({profile:"barc-live-tactical-stock-v1",tacticalRevision:2,queueEvidenceScheme:2,actor:{id:"42",lifetime:"9007199254741105"},catalogueId,catalogueRevision:"9007199254741107",engineVersion:"2025.06.19",gameName:"BAR",gameVersion:"test-29926-0571aa8",contentSha256:"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",domain:"production"});
const context=()=>({profile:"barc-live-tactical-stock-v1",tacticalRevision:2,queueEvidenceScheme:2,actor:{id:"42",lifetime:"9007199254741105"},catalogueId,catalogueRevision:"9007199254741107",engineVersion:"2026.07.04",gameName:"BAR",gameVersion:"test-29926-0571aa8",contentSha256:"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",domain:"production"});
const nativeBasis=(sequence="20",frame=20)=>({token:Buffer.from("basis-token").toString("base64"),stateSequence:sequence,frame,matchIncarnation:matchId,processIncarnation:"process-1",stateChannelIncarnation:"channel-1",snapshotSendMonotonicNs:"9007199254742000",effectiveCadenceFrames:2});
const dispatch=()=>({brokerSessionId:Buffer.from(Array(16).fill(9)).toString("base64"),commandChannelIncarnation:"command-channel-1",batchSequence:"91",correlationId:"92",commandIndex:7,authorityEpoch:"3",moduleSha256:"a".repeat(64),moduleGeneration:"4",expectedQueueRevision:"18145486220354098388",matched:true});
const record=(phase="sample",basis=nativeBasis())=>({schema:"highbar.barc-stock-queue-trace/v1",runId:"stock-run",sequence:"1",phase,readFrame:21,perspectiveTeamId:0,nativeBasis:basis,context:context(),reader:{kind:"CallRules",status:"complete",request,response},queue:{revision:"18145486220354098388",entries:[{id:-710,codedOptions:32,tag:41,float32params:["3f800000","80000000"]}]},dispatch:phase==="sample"?null:dispatch()});
const dispatch=()=>({brokerSessionId:Buffer.from(Array(16).fill(9)).toString("base64"),commandChannelIncarnation:"command-channel-1",batchSequence:"91",correlationId:"92",commandIndex:7,authorityEpoch:"3",moduleSha256:"a".repeat(64),moduleGeneration:"4",expectedQueueRevision:"11858024252242068063",matched:true});
const record=(phase="sample",basis=nativeBasis())=>({schema:"highbar.barc-stock-queue-trace/v1",runId:"stock-run",sequence:"1",phase,readFrame:21,perspectiveTeamId:0,nativeBasis:basis,context:context(),reader:{kind:"CallRules",status:"complete",request,response},queue:{revision:"11858024252242068063",entries:[{id:-710,codedOptions:32,tag:41,float32params:["3f800000","80000000"]}]},dispatch:phase==="sample"?null:dispatch()});
const browserBasis=basis=>canonicalObject(v1.ObservationBasis,encodeObject(v1.ObservationBasis,{token:basis.token,stateSequence:basis.stateSequence,nativeFrame:basis.frame,matchId:basis.matchIncarnation,processIncarnation:basis.processIncarnation,stateChannelIncarnation:basis.stateChannelIncarnation}));
const observations=basis=>({host:{nativeBasis:basis,actor:{id:"42",lifetime:"9007199254741105"},catalogue:{id:catalogueId,revision:"9007199254741107",contentSha256:context().contentSha256}},browser:{basis:browserBasis(basis),tactical:{actors:[{actor:{id:"42",lifetime:"9007199254741105"},queue:[{domain:"QUEUE_DOMAIN_FACTORY_PRODUCTION",revision:"18145486220354098388",complete:true,evidenceScheme:"NATIVE_QUEUE_EVIDENCE_SCHEME_STOCK_LUA_SUPPORTED_FIELDS_V1"}]}]}}});
const observations=basis=>({host:{nativeBasis:basis,actor:{id:"42",lifetime:"9007199254741105"},catalogue:{id:catalogueId,revision:"9007199254741107",contentSha256:context().contentSha256}},browser:{basis:browserBasis(basis),tactical:{actors:[{actor:{id:"42",lifetime:"9007199254741105"},queue:[{domain:"QUEUE_DOMAIN_FACTORY_PRODUCTION",revision:"11858024252242068063",complete:true,evidenceScheme:"NATIVE_QUEUE_EVIDENCE_SCHEME_STOCK_LUA_SUPPORTED_FIELDS_V1"}]}]}}});
const codec={canonicalObject,encodeObject,v1};

test("scheme2 revision vector and actual production codec normalization preserve signed zero",()=>{
const value=record();assert.equal(computeStockRevision(value.context,[{domain:"production",...value.queue.entries[0]}]),"18145486220354098388");const actual=observations(value.nativeBasis),normalized=normalizeStockSample(value,actual.host,actual.browser,codec);assert.equal(normalized.value.entries[0].float32params[1],"80000000");assert.deepEqual(normalized.value.basis,actual.browser.basis);assert.equal(normalized.value.catalogueId,catalogueId);
const value=record();assert.equal(computeStockRevision(value.context,[{domain:"production",...value.queue.entries[0]}]),"11858024252242068063");const actual=observations(value.nativeBasis),normalized=normalizeStockSample(value,actual.host,actual.browser,codec);assert.equal(normalized.value.entries[0].float32params[1],"80000000");assert.deepEqual(normalized.value.basis,actual.browser.basis);assert.equal(normalized.value.catalogueId,catalogueId);
});

test("selected engine admission refuses the historical profile while its revision golden remains reproducible",()=>{
const historical={...context(),engineVersion:"2025.06.19"};
assert.equal(computeStockRevision(historical,[{domain:"production",...record().queue.entries[0]}]),"18145486220354098388");
const stale=record();stale.context=historical;stale.queue.revision="18145486220354098388";
assert.throws(()=>validateStockTraceRecord(stale),/stock context identity changed/);
});

test("stock trace parsing is closed, contiguous and complete",()=>{
Expand Down