Skip to content

Commit f2dab0f

Browse files
mchwangclaude
andcommitted
Port D2 regression tests to named isolation probes
D3 replaced raw test argv with fixed isolation probes, so the seeding, page-rounding and namespace regressions from D2 now use the metadata and noop probes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 733ef55 commit f2dab0f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎test/agent-container.test.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,18 @@ describe('real Docker agent isolation', () => {
122122
const data = fixture({ historyBytes: 4 * 1024 * 1024, limits: {
123123
workBytes: 1024 * 1024, workInodes: 512, metadataBytes: 16 * 1024 * 1024, metadataInodes: 512,
124124
} });
125-
expect(runContainer(profile(data, 'review', ['sh', '-c',
126-
'set -eu; test ! -e /work/history.bin; git cat-file -e HEAD~1:history.bin; cat /work/file.txt']))).toBe('trusted');
125+
expect(runContainer(profile(data, 'execute', 'metadata'))).toBe('metadata-safe');
127126
}, 60_000);
128127

129128
it('accepts byte limits that tmpfs rounds up to a whole page', () => {
130129
const data = fixture({ limits: {
131130
workBytes: 16 * 1024 * 1024 + 1, workInodes: 512, metadataBytes: 16 * 1024 * 1024 + 1, metadataInodes: 512,
132131
} });
133-
expect(runContainer(profile(data, 'execute', ['sh', '-c', 'printf rounded']))).toBe('rounded');
132+
expect(runContainer(profile(data, 'execute', 'noop'))).toBe('');
134133
}, 60_000);
135134

136135
it('requests private IPC and cgroup namespaces instead of relying on daemon defaults', () => {
137-
const args = profile(fixture(), 'planning', ['true']).args;
136+
const args = profile(fixture(), 'planning', 'noop').args;
138137
expect(args).toContain('--ipc=private');
139138
expect(args).toContain('--cgroupns=private');
140139
}, 60_000);

0 commit comments

Comments
 (0)