Personal Telegram developer console for GitHub
test: align legacy Workspace input with expanded safety bounds
davoodmehraban89 committed
Oct 4, 2026 at 11:26 UTC
7b67300c08de0570fa1b03392e1fa974795bff0e
1 file changed
+5
-5
test/github-workspace-integration.test.js
+5
-5
@@ -139,13 +139,13 @@ test('PluginRouter dispatchMessage applies the same policy boundary without audi
139
assert.equal(JSON.stringify(auditEvents).includes('TOP SECRET SOURCE'), false);
140
});
141
142
-test('draft input is prepared without GitHub calls and the next owner text is consumed exactly once', async () => {
142
+test('legacy draft input is prepared without GitHub calls and the next owner text is consumed exactly once', async () => {
143
const { github, workspaces, plugin } = makePlugin();
144
const prepare = plugin.resolveCallback(`wtext:${WORKSPACE_ID}`, { ownerId: OWNER });
145
assert.equal(prepare.actionId, 'github.workspace.input.prepare');
146
assert.deepEqual(github.calls, []);
147
const prompt = await prepare.execute();
148
- assert.match(prompt.text, /3,000|3000/);
148
+ assert.match(prompt.text, /20,000|20000/);
149
assert.deepEqual(github.calls, []);
150
151
const pending = await workspaces.getPendingInput({ ownerId: OWNER });
@@ -163,14 +163,14 @@ test('draft input is prepared without GitHub calls and the next owner text is co
163
assert.deepEqual(github.calls, []);
164
});
165
166
-test('oversized multibyte draft input is visibly rejected without mutating the old draft', async () => {
166
+test('oversized multibyte legacy draft input is visibly rejected without mutating the old draft', async () => {
167
const { workspaces, plugin } = makePlugin();
168
await plugin.resolveCallback(`wtext:${WORKSPACE_ID}`, { ownerId: OWNER }).execute();
169
const before = workspaces.workspace.draftText;
170
const pending = await workspaces.getPendingInput({ ownerId: OWNER });
171
- const route = plugin.resolveMessage({ pending, text: '😀'.repeat(3001) }, { ownerId: OWNER });
171
+ const route = plugin.resolveMessage({ pending, text: '😀'.repeat(16385) }, { ownerId: OWNER });
172
const view = await route.execute();
173
- assert.match(view.text, /12,000|12000|3,000|3000|مجاز|حد/i);
173
+ assert.match(view.text, /65,536|65536|20,000|20000|مجاز|حد/i);
174
assert.equal(workspaces.workspace.draftText, before);
175
assert.equal(await workspaces.getPendingInput({ ownerId: OWNER }), null);
176
});