A proved routine is not said to have run out of time
Build, test, deploy / site (push) Successful in 7m38s
Build, test, deploy / site (push) Successful in 7m38s
In a container running the tests on two processors, the Quarto gallery's proved example was rendered with the warning that time ran out: the generated inputs that cross-check a proof had been cut short by the 3-second clock, with every claim already proved. core 941af6b counts that only where a claim is still open. The tests that hold what a proof finds give it time to spare, and the browser-side request builder takes prove-seconds as the Lua filter does.
This commit is contained in:
5 files changed
+12
-3
No files matched your search
@@ -35,6 +35,7 @@ No version has been tagged yet. What programs mean is pplus-core's, and its chan
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- A proved routine is no longer said to have run out of time when only the generated inputs that cross-check it were cut short (core `941af6b`): in a container running the tests on two processors the Quarto gallery's proved example got that warning. The tests that hold what a proof finds give it time to spare.
|
||||||
- The home page shows at once. It was blank until every module had loaded and the page's examples had been run, a fuzzer's report among them: first paint came after 1.3 seconds on a repeat visit and about 3 on a first one. The assembled site now carries the home page already drawn (`scripts/assemble-page.mjs`, `src/ui/prerender.ts`), painted with the HTML; the app takes its place when it has loaded, without running the fuzzer and the prover again. Measured on the assembled site served locally: first paint 0.1 to 0.2 seconds, the page with its controls at 0.2 to 0.3 (it was 1.2 to 1.4 for both). The inline script of `index.html` changed, and its hash in `docs/Caddyfile` with it.
|
- The home page shows at once. It was blank until every module had loaded and the page's examples had been run, a fuzzer's report among them: first paint came after 1.3 seconds on a repeat visit and about 3 on a first one. The assembled site now carries the home page already drawn (`scripts/assemble-page.mjs`, `src/ui/prerender.ts`), painted with the HTML; the app takes its place when it has loaded, without running the fuzzer and the prover again. Measured on the assembled site served locally: first paint 0.1 to 0.2 seconds, the page with its controls at 0.2 to 0.3 (it was 1.2 to 1.4 for both). The inline script of `index.html` changed, and its hash in `docs/Caddyfile` with it.
|
||||||
- The deploy job publishes to `/srv/www/pplus`, the directory the site is served from, unless `SITE_SLUG` says otherwise. Its default was the repository's name, so the job published to `/srv/www/pplus-web` and the live site did not change.
|
- The deploy job publishes to `/srv/www/pplus`, the directory the site is served from, unless `SITE_SLUG` says otherwise. Its default was the repository's name, so the job published to `/srv/www/pplus-web` and the live site did not change.
|
||||||
- The deploy job's smoke test always runs on `main`: it asks the live site for its version after publishing, at `https://pplus.scient.ing` unless `SITE_URL` names another address. It ran only when that variable was set, and it was not.
|
- The deploy job's smoke test always runs on `main`: it asks the live site for its version after publishing, at `https://pplus.scient.ing` unless `SITE_URL` names another address. It ran only when that variable was set, and it was not.
|
||||||
|
|||||||
+1
-1
Submodule core updated: 38e6e2cdd2...941af6bc78.
@@ -113,6 +113,7 @@ export function requestFor(view: StaticView, attrs: Record<string, string>, file
|
|||||||
if (attrs.t && Number.isFinite(Number(attrs.t))) req.t = Number(attrs.t);
|
if (attrs.t && Number.isFinite(Number(attrs.t))) req.t = Number(attrs.t);
|
||||||
if (attrs.title) req.title = attrs.title;
|
if (attrs.title) req.title = attrs.title;
|
||||||
if (attrs.max && Number.isFinite(Number(attrs.max))) req.max = Number(attrs.max);
|
if (attrs.max && Number.isFinite(Number(attrs.max))) req.max = Number(attrs.max);
|
||||||
|
if (Number(attrs['prove-seconds']) > 0) req.proveSeconds = Number(attrs['prove-seconds']);
|
||||||
if (attrs.views) req.hw = list(attrs.views);
|
if (attrs.views) req.hw = list(attrs.views);
|
||||||
if (attrs.preset) req.preset = attrs.preset;
|
if (attrs.preset) req.preset = attrs.preset;
|
||||||
if (attrs.listing === '0') req.listing = false;
|
if (attrs.listing === '0') req.listing = false;
|
||||||
|
|||||||
@@ -58,11 +58,15 @@ test('a proof the clock stopped says so, offers the next longer time, and is pro
|
|||||||
s.setProofClock(10000);
|
s.setProofClock(10000);
|
||||||
assert.equal(s.proofClock(), 10000);
|
assert.equal(s.proofClock(), 10000);
|
||||||
assert.equal(told, 1);
|
assert.equal(told, 1);
|
||||||
|
assert.equal(s.proof().report.clock.budgetMs, 10000, 'proved again, with the new time');
|
||||||
|
assert.equal(draw(s, true).querySelector('select#proof-clock').value, '10000');
|
||||||
|
// what enough time gives is held with no clock at all, so this does not depend on how fast or busy the machine is
|
||||||
|
s.proofBudgetMs = Infinity;
|
||||||
const whole = s.proof().report;
|
const whole = s.proof().report;
|
||||||
assert.deepEqual(whole.clock, { budgetMs: 10000, stopped: [] });
|
assert.deepEqual(whole.clock.stopped, []);
|
||||||
assert.ok(whole.counts.proved > cut.counts.proved);
|
assert.ok(whole.counts.proved > cut.counts.proved);
|
||||||
assert.equal(draw(s, true).querySelector('.proof-timeout'), null);
|
assert.equal(draw(s, true).querySelector('.proof-timeout'), null);
|
||||||
assert.equal(draw(s, true).querySelector('select#proof-clock').value, '10000');
|
s.proofBudgetMs = 10000;
|
||||||
s.setProofClock(10000);
|
s.setProofClock(10000);
|
||||||
assert.equal(told, 1, 'the same time again is no change');
|
assert.equal(told, 1, 'the same time again is no change');
|
||||||
s.setProofClock(3000);
|
s.setProofClock(3000);
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ test('the gallery\'s samples render as a page would get them, and every run in i
|
|||||||
const view = def.view ?? (s.attrs.view === 'dataflow' ? 'data' : s.attrs.view);
|
const view = def.view ?? (s.attrs.view === 'dataflow' ? 'data' : s.attrs.view);
|
||||||
const req = requestFor(view, s.attrs, files);
|
const req = requestFor(view, s.attrs, files);
|
||||||
if (def.hw) req.hw = [def.hw];
|
if (def.hw) req.hw = [def.hw];
|
||||||
|
// a proof with time to spare: the 3 seconds a page gets by default can run out on a loaded machine, and the
|
||||||
|
// render then warns (prove-seconds); what the sample proves is held here, not how fast this machine is
|
||||||
|
if (view === 'proof') req.proveSeconds = 600;
|
||||||
const r = renderStatic(req);
|
const r = renderStatic(req);
|
||||||
assert.deepEqual(r.warnings, [], `${s.name} ${JSON.stringify(s.attrs)}`);
|
assert.deepEqual(r.warnings, [], `${s.name} ${JSON.stringify(s.attrs)}`);
|
||||||
if (r.expect) assert.ok(r.expect.ok, `${s.name}: ${JSON.stringify(r.expect)}`);
|
if (r.expect) assert.ok(r.expect.ok, `${s.name}: ${JSON.stringify(r.expect)}`);
|
||||||
|
|||||||
Reference in new issue
Block a user