Repository navigation
feat(source): exclude active control directory and runtime state from observation and watchers - #2107
Draft
chris-beckman wants to merge 15 commits into
Draft
chris-beckman wants to merge 15 commits into
chris-beckman wants to merge 15 commits into
Conversation
… policy (WIP) Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
…ad floor across catalog and watchers Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
…ndary tests Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
… seed live watcher subdirs Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
…t read floor across survey tools Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
…ssionPrefix Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
…eshness_test Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
…irect survey/catalog entrypoints on human-warmed control root Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
…ness_test Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
chris-beckman
force-pushed
the
feat/PR04-control-dir-watcher-exclusion
branch
5 times, most recently
from
November 10, 2026 12:14
f7daef8 to
4c4a0ec
Compare
…in confine and enforce session ownership Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
chris-beckman
force-pushed
the
feat/PR04-control-dir-watcher-exclusion
branch
from
November 10, 2026 12:20
4c4a0ec to
f47882a
Compare
…protected floor Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR04 Verification & Implementation Report (
f47882af8f190397f6a3226ce78845e3df789f90)#2107(https://github.com/paintedwolf-ai/paintedwolf-code/pull/2107,isDraft: true)feat/PR04-control-dir-watcher-exclusionfeat/PR01-unrestricted-project-roots(#2103@8a0c5a3071f4ede07c4866a97a3361830f392c92), based onorigin/main(7e21d294a5aacaa6218cfd3f39643513a3745750). Note:PR04depends only onPR01(#2103), not onPR03.f47882af8f190397f6a3226ce78845e3df789f90HEAD^{tree}):029f702a528ed2c9338fcfb9d58526f5b2a41f5a1. Disposition of
decisions/006-pr03-pr04-follow-up.mdItem 1 — Single Authoritative Read-Floor Policy in
confine(agent_read_floor.go)AgentReadFloor,CompileAgentReadFloor, andIsAgentSourceReadDeniedout oflycaon/internal/enginepaths/observation_boundary.goand intolycaon/internal/confine/agent_read_floor.go.defaultHomeKeyMaterialRelPaths,effectiveAgentExtraDenyRoots, andsplitEnvPathListfromenginepaths/observation_boundary.go.confine.CompileAgentReadFloorandconfine.IsAgentSourceReadDeniednow consumeconfine's authoritative:configuredReadDenyRoots()inlycaon/internal/confine/read_floor.go(parsingLYCAON_SANDBOX_DENY_READviafilepath.SplitList/os.PathListSeparatorand honoringsecretReadDenyDisabled()opt-out tokensoff,none,disable,disabledwithout treating opt-out tokens as relative path tokens),KeyMaterialReadDenyPaths()(pack-sourced key-material read floor, which remains enforced even when the control-plane read floor is opted out),controlPlaneReadDenyRoots()andEffectiveSessionDirsForRoot(root, sessionScratch, sessionOutput).lycaon/internal/enginepaths/observation_boundary.gois now strictly focused on project-observation exclusion (IsObservedStateExcluded,IsObservedDirChildExcluded,IsControlRootRuntimeEntry, and pure lexical/canonical path helpers).Item 2 — Managed-Workspace Carve-Out Restricted to Control-Directory Deny Root Only
lycaon/internal/confine/agent_read_floor.go,lycaon/internal/confine/protected_root_intersection.go(underSecretReadDeny), andlycaon/internal/confine/write_root_grants.go(ControlPlanePathDenied), a managed workspace (<configdir>/session-worktrees/<p>/<s>,<configdir>/drafts/<id>,<configdir>/worker-branches/<p>/<j>, etc.) or invocation-owned session directory ONLY carves out theconfigdir.Root()/ placement control-plane deny root, and never carves out explicit extra deny roots (configuredReadDenyRoots()fromLYCAON_SANDBOX_DENY_READ) orKeyMaterialReadDenyPaths().TestCompileAgentReadFloor_ManagedWorkspaceRespectsExplicitExtraDenyRoots(confine/agent_read_floor_test.go),TestCompileAndAssertReadScopeControlPlaneAndSessionScratch(sandbox/read_scope_test.go),TestHumanWarmedSharedCatalogNeverLeaksControlPlaneOrKeyMaterialToAgent(sourcecatalog/index_read_test.go), andTestDirectControlRootAttachmentWithHumanWarmedCatalogCannotExposeStateToAgentTools(tools/native/survey/scratch_freshness_test.go) across both subtree (<wt>/private) and whole-root (<wt>)LYCAON_SANDBOX_DENY_READconfigurations, including on a human-warmed catalog.Item 3 — Concrete Session Path Shape vs. Invocation Ownership
explicitConfigSessionPrefixfromlycaon/internal/enginepaths/observation_boundary.goand ensuredEffectiveSessionDirsForRoot(root, sessionScratch, sessionOutput)inlycaon/internal/confine/write_root_grants.gohas no fallback that infers authority from concrete<configdir>/scratch/<any-id>or<configdir>/session-output/<any-id>path shape.<configdir>/scratch/<any-id>and<configdir>/session-output/<any-id>remain excluded byenginepaths.IsObservedStateExcludedeven when attached directly asrootPath.sandbox.WithSessionDirs(ctx, tctx.Host.SessionScratchDir, tctx.Host.SessionOutputDir)andsandbox.SessionDirsFromContext(ctx)acrosstools/invocation_confinement.go,tools/projectpaths/projectpaths.go,tools/native/survey/{find,list_dir,grep,wc,stat,read,source_catalog}.go,sandbox/{read_scope,boundary_impl,survey_walk}.go, andsourcecatalog/{snapshot,index_store,index_agent_floor}.go.@scratch(<configdir>/scratch/sess-1) and@output(<configdir>/session-output/sess-1) remain discoverable and readable for their owning invocation, while attaching another session's scratch directory (<configdir>/scratch/other-session) is excluded and denied acrossconfine,sandbox,sourcecatalog, and all native survey/read tools.Item 4 — Size-Budget Inspection & Architectural Disposition
8a0c5a3071)2aa240b691)f47882af8f)lycaon/internal/enginepaths/observation_boundary.goIsObservedStateExcluded,IsObservedDirChildExcluded,IsControlRootRuntimeEntry)lycaon/internal/confine/agent_read_floor.goAgentReadFloor,CompileAgentReadFloor,IsAgentSourceReadDenied)lycaon/internal/sourcecatalog/index_store.goIndexReaderqueries (14 lines below pre-PR04 baseline)lycaon/internal/sourcecatalog/index_agent_floor.goIndexReaderagent read-floor and private-path projection helperslycaon/internal/sourcecatalog/summary_write.goconfine.CompileAgentReadFloor)lycaon/internal/sourcecatalog/summary_read.gosummaryStorebyfloor.CacheKey())lycaon/internal/sandbox/survey_walk.goIsObservedStateExcludedand invocation-owned session supportShared-File Composition with
PR03PR04shares the following files withPR03using identical function signatures and semantics soPR01 -> PR03 -> PR04(orPR01 -> PR04 -> PR03) merges cleanly:lycaon/internal/confine/read_floor.go:configuredReadDenyRoots()andSecretReadDenyRoots().lycaon/internal/confine/protected_root_intersection.go:underSecretReadDeny(path)checksconfiguredReadDenyRoots()beforeunderSecretReadAllowBack(path).lycaon/internal/confine/write_root_grants.go:ControlPlanePathDenied,EffectiveSessionDirsForRoot(root, sessionScratch, sessionOutput), andRootOverlapsControlPlaneReadFloor(root).lycaon/internal/sandbox/context.go:WithSessionDirs(ctx, scratchDir, outputDir)andSessionDirsFromContext(ctx).lycaon/internal/tools/invocation_confinement.go&lycaon/internal/tools/projectpaths/projectpaths.go:sandbox.WithSessionDirs(ctx, tctx.Host.SessionScratchDir, tctx.Host.SessionOutputDir).2. Tree-Bound Remote Verification
Both remote verification runs executed against the exact tree of
HEAD(f47882af8f190397f6a3226ce78845e3df789f90):HEAD:f47882af8f190397f6a3226ce78845e3df789f90HEAD^{tree}:029f702a528ed2c9338fcfb9d58526f5b2a41f5am1@62.210.150.58) Receipt:76c4d458064f4bc688d72d05083535d600000000000000000002-f152a9d5efeb4569985d9c6dea2a56c2source_commit:88ee84d4e85188322675f7b4952308d020d70344source_tree:029f702a528ed2c9338fcfb9d58526f5b2a41f5a(exact match toHEAD^{tree})passed(exit_code: 0, 11 packages, 2300 passed, 0 failed, 64 skipped)cdbeckman@10.0.20.5) Receipt:cedbc7315e034327bd4b6836a39c653600000000000000000002-cd29470ef4514d288a3d7195f7e7d68bsource_commit:4427e87be2e5e1b2a5896a33e93d4cc9e54a9a01source_tree:029f702a528ed2c9338fcfb9d58526f5b2a41f5a(exact match toHEAD^{tree})passed(exit_code: 0, 11 packages, 2619 passed, 0 failed, 15 skipped)Per-Package Outcome Table (
stage-001.json/stage-001-go.json)github.com/lycaon/lycaon/internal/confinepasspasshub.lumenfield.work/lycaon/lycaon/internal/confine/linuxsandboxpasspasshub.lumenfield.work/lycaon/lycaon/internal/enginepathspasspasshub.lumenfield.work/lycaon/lycaon/internal/projectsourcepasspasshub.lumenfield.work/lycaon/lycaon/internal/repochangepasspasshub.lumenfield.work/lycaon/lycaon/internal/sandboxpasspasshub.lumenfield.work/lycaon/lycaon/internal/sourcecatalogpasspasshub.lumenfield.work/lycaon/lycaon/internal/sourcefeedpasspasshub.lumenfield.work/lycaon/lycaon/internal/sourcescopepasspasshub.lumenfield.work/lycaon/lycaon/internal/surveypasspasshub.lumenfield.work/lycaon/lycaon/internal/tools/native/surveypasspasspassedpassedKey PR04 Acceptance Tests (
stage-001-go.json)internal/confineTestCompileAgentReadFloor_ControlPlaneAndKeyMaterialpass(0.00s)pass(0.00s)internal/confineTestCompileAgentReadFloor_OptOutAndPathListSeparatorpass(0.00s)pass(0.00s)internal/confineTestCompileAgentReadFloor_ManagedWorkspaceRespectsExplicitExtraDenyRootspass(0.00s)pass(0.00s)internal/confineTestCompileAgentReadFloor_SessionOwnershipRequiredpass(0.00s)pass(0.01s)internal/enginepathsTestIsObservedStateExcluded_StrictAncestorExcludesActiveControlDirAndPlacementspass(0.01s)pass(0.01s)internal/enginepathsTestIsObservedStateExcluded_DirectAndChildControlDirAttachmentpass(0.00s)pass(0.00s)internal/enginepathsTestIsObservedStateExcluded_CanonicalAliasesSymlinksAndCasepass(0.00s)pass(0.00s)internal/repochangeTestPrivateTreeSuppressesOnlyItsOwnWatcherChangespass(0.00s)pass(0.00s)internal/sandboxTestCompileAndAssertReadScopeControlPlaneAndSessionScratchpass(0.00s)pass(0.00s)internal/sourcecatalogTestHumanWarmedSharedCatalogNeverLeaksControlPlaneOrKeyMaterialToAgentpass(0.06s)pass(0.87s)internal/tools/native/surveyTestScratchSurveySeesWritesAfterEmptyInventorypass(0.01s)pass(0.01s)internal/tools/native/surveyTestDirectControlRootAttachmentWithHumanWarmedCatalogCannotExposeStateToAgentToolspass(0.06s)pass(0.05s)3. Collected Artifact Paths & SHA256 Digests
All artifacts are stored in
/Users/cdbeckman/.local/share/paintedwolf-unrestricted-project-roots/artifacts/PR04/f47882af8f190397f6a3226ce78845e3df789f90/(and mirrored at/Users/cdbeckman/.local/share/paintedwolf-unrestricted-project-roots/artifacts/PR04/):macos-test-digest-receipt.json27ffd4531a1615b7ff2445f36ca0f94ea317165b3dd94bdcc35a982cb0e359fbmacos-test-digest-stage-001.json2b0556fdbe8cd542b4bd43b90788e7f6166e8abe0eabd7c6f3563c8f3b981f69macos-test-digest-stage-001-go.json3317ed431cec8a833c6de53c3666fc7683799faf4dade2c8befa20162af7681fmacos-test-digest-stage-001.loge35cb260eb342cae6b2124ad44887cd6c9e74f6ebe75e6b1db472f3e2bc11d54linux-test-digest-receipt.jsonded197055ef551376d5258cf8f0600f5d571da01aaa1ab4513f88195369405eclinux-test-digest-stage-001.json4724deb8d45469440f48de0475b977de8d1f8d9d7e48af76d8f3ba552de3c1b9linux-test-digest-stage-001-go.jsonf3c0c5613b9ea3f0612e032eb8c71719664fa3c00e4f522a2f5a95a8f168edd7linux-test-digest-stage-001.logb24b9d28e7c7ca046a940c88f00e85e16013521c20061588e63a79d3180c3394