Exercise feature activation rollback and old-session artifact retention
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a0cffe-206f-7323-89d3-b20ca4cf4bf9
This commit is contained in:
parent
b8eec87f08
commit
e34ec3fafe
22 changed files with 1661 additions and 1 deletions
29
research/experiments/feature-release/host.js
Normal file
29
research/experiments/feature-release/host.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
const HOST_API = 1;
|
||||
window.observed = {mounts: [], errors: [], evaluations: [], hostApi: HOST_API};
|
||||
const report = document.getElementById('reports');
|
||||
const account = document.getElementById('account');
|
||||
async function load(name, target) {
|
||||
try {
|
||||
const feature = name === 'reports' ? await import('reports') : await import('account');
|
||||
// Compatibility gate, not a security boundary: module evaluation already happened.
|
||||
if (feature.hostApi !== HOST_API) throw new Error('incompatible host API');
|
||||
feature.mount(target);
|
||||
window.observed.mounts.push({name, version: feature.version});
|
||||
return {ok: true, version: feature.version};
|
||||
} catch (error) {
|
||||
target.textContent = `${name} unavailable`;
|
||||
window.observed.errors.push({name, message: error.message});
|
||||
return {ok: false, message: error.message};
|
||||
}
|
||||
}
|
||||
window.loadReports = () => load('reports', report);
|
||||
window.loadAccount = () => load('account', account);
|
||||
try {
|
||||
await import('shared');
|
||||
for (const button of document.querySelectorAll('button')) button.disabled = false;
|
||||
document.getElementById('status').textContent = 'ready';
|
||||
} catch {
|
||||
document.getElementById('status').textContent = 'startup failed';
|
||||
}
|
||||
document.getElementById('reports-nav').onclick = window.loadReports;
|
||||
document.getElementById('account-nav').onclick = window.loadAccount;
|
||||
Loading…
Add table
Add a link
Reference in a new issue