gh#179: workspace_app_context loads a repository’s own file, opt-in

Tests › tests/unit/api/workspace_app_context_test.cpp

absent Not in the packaged run: no test report names it.

What this test is for

Why it exists

The test says nothing about why.

tests/unit/api/workspace_app_context_test.cpp:106 · its file's page

What it checks (15)

  1. REQUIRE(f.rc == ENTROPIC_OK) not attributed
  2. REQUIRE(entropic_workspace_create(f.h, "B", b.c_str()) == ENTROPIC_OK) observes entropic_workspace_create
  3. REQUIRE(entropic_workspace_create(f.h, "C", c.c_str()) == ENTROPIC_OK) observes entropic_workspace_create
  4. REQUIRE(entropic_session_bind_workspace(f.h, "in-b", "B") == ENTROPIC_OK) observes entropic_session_bind_workspace
  5. REQUIRE(entropic_session_bind_workspace(f.h, "in-c", "C") == ENTROPIC_OK) observes entropic_session_bind_workspace
  6. CHECK(has(f.prompt("in-b"), "B-FILE-CTX")) observes has
  7. CHECK_FALSE(has(f.prompt("in-b"), "HANDLE-CTX")) observes has
  8. CHECK(has(f.prompt("in-c"), "HANDLE-CTX")) observes has
  9. CHECK(entropic_workspace_create(f.h, "D", d.c_str()) == ENTROPIC_ERROR_INVALID_ARGUMENT) observes entropic_workspace_create
  10. CHECK(has(entropic_last_error(f.h), "outside the workspace root")) observes has
  11. REQUIRE(f.rc == ENTROPIC_OK) not attributed
  12. REQUIRE(entropic_workspace_create(f.h, "B", b.c_str()) == ENTROPIC_OK) observes entropic_workspace_create
  13. REQUIRE(entropic_session_bind_workspace(f.h, "in-b", "B") == ENTROPIC_OK) observes entropic_session_bind_workspace
  14. CHECK_FALSE(has(f.prompt("in-b"), "B-FILE-CTX")) observes has
  15. CHECK(has(f.prompt("in-b"), "HANDLE-CTX")) observes has

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

gh#179: workspace_app_context loads a repository's own file, opt-in→REQUIRE→repo→entropic_workspace_create→entropic_workspace_create→entropic_session_bind_workspace→entropic_session_bind_workspace→has→prompt→entropic_last_error→entropic_last_error

What it reaches

Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.

gh#179: workspace_app_context loads a repository's own file, opt-in · 15 checksentropic_last_errorREQ-ABI-001 · inferredentropic_session_bind_workspaceREQ-ABI-002 · inferredentropic_last_errorREQ-API-003 · inferredentropic_session_bind_workspaceREQ-API-005 · inferredentropic_last_errorREQ-API-007 · inferredentropic_workspace_create… 3 calls …bridge_project_dirREQ-BRIDGE-001 · inferredentropic_workspace_createapply_workspace_app_contextresolve_data_dirREQ-CFG-008 · inferredentropic_workspace_create… 4 calls …DelegateToolREQ-DELEG-006 · inferredentropic_workspace_create… 3 calls …fire_preREQ-HOOK-001 · inferredentropic_workspace_createbuild_workspaceinit_builtinsREQ-MCP-001 · inferredentropic_workspace_create… 3 calls …register_toolREQ-MCP-003 · inferredentropic_workspace_createbuild_workspaceload_pluginsloadREQ-MCP-004 · inferred

and 13 more requirement paths, listed below.

Also reaches 25 requirements

Its run touches their code; that is reach, not proof.