@@ -113,6 +113,33 @@ describe("systemSection", () => {
113113 expect ( out ) . toContain ( "never substitute" )
114114 } )
115115
116+ test ( "a bound project is followed by what the workspace provides, kept apart from built-in skills" , async ( ) => {
117+ await recordApprovedBinding (
118+ projectDir ,
119+ { datamateId : 42 , datamateName : "Growth" , repoRemote : null , projectPath : projectDir , linkedAt : Date . now ( ) } as never ,
120+ { awaitBackfill : true } ,
121+ )
122+ const out = await inProject ( systemSection )
123+ const identityAt = out . indexOf ( "## Altimate Workspace\n" )
124+ const contentsAt = out . indexOf ( "## What this Altimate Workspace provides" )
125+ expect ( identityAt ) . toBeGreaterThanOrEqual ( 0 )
126+ expect ( contentsAt ) . toBeGreaterThan ( identityAt )
127+ // No snapshot was synced in this sandbox: said so, not "no skills".
128+ expect ( out ) . toContain ( "not synced to this project yet" )
129+ expect ( out ) . toContain ( "built-in" )
130+ } )
131+
132+ test ( "an unlinked project gets no workspace-contents block" , async ( ) => {
133+ globalThis . fetch = ( async ( ) =>
134+ new Response ( JSON . stringify ( { detail : "not found" } ) , {
135+ status : 404 ,
136+ headers : { "content-type" : "application/json" } ,
137+ } ) ) as unknown as typeof fetch
138+ const out = await inProject ( systemSection )
139+ expect ( out ) . toContain ( "No Altimate Workspace is linked" )
140+ expect ( out ) . not . toContain ( "What this Altimate Workspace provides" )
141+ } )
142+
116143 test ( "a bound project gets the team-memory line only once the workspace's memory is confirmed on" , async ( ) => {
117144 const { memoryEnabledCache, resetEnablementMemoForTests, noteMemoryDisabledForTests } = await import (
118145 "../../../src/altimate/workspace/memory-sync"
0 commit comments