Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienos.com/patches/490add14ad66529b # aienos.com Source of www.aienos.com, served from my own hardware Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers ## GitHub aien-dev/aienos.com#24 (code only) closed derived `490add14ad66529b` #24 Imported from GitHub aien-dev/aienos.com#24 (code only) GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed). Base `0c6d24b82e6362b68a86271849897d829b93e21a` · Head `d8e2f4cb7b31bf08417ec17016dd38f3d26edb44` ### Apply it ``` git checkout -b patch-490add14ad66529b 0c6d24b82e6362b68a86271849897d829b93e21a curl -fsSL https://interplane.io/drakestapleton/aienos.com/patches/490add14ad66529b.patch | git am ``` Raw patch (mbox) · Diff ### Provenance This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record: ``` github-import 1 aien-dev/aienos.com 24 d8e2f4cb7b31bf08417ec17016dd38f3d26edb44 ``` ``` {"kind":"github-import","owner":"aien-dev","repo":"aienos.com","number":24,"url":"https://github.com/aien-dev/aienos.com/pull/24","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:38:37Z","metadata":"unavailable","state_derived":true} ``` ### Changes ``` diff --git a/.crumb b/.crumb new file mode 100644 index 00000000..5f60a37b --- /dev/null +++ b/.crumb @@ -0,0 +1,40 @@ +{ + "schema_version": "1.0.0", + "name": "aienos.com", + "layer": "website", + "purpose": "Public AIEN website built with Rust; publishes source-backed research and project progress", + "invariants": [ + "Build the existing website with Rust and deploy through GitHub Pages.", + "Public measurement collection must validate completely before deployment; failed refreshes preserve the last live site.", + "RFC-0001 directory coordination: sniff, claim, execute, close; .crumb.local stays ephemeral." + ], + "extensions": { + "protocol": { + "spec": "https://github.com/aien-dev/crumb-spec/blob/10b8251/SPEC.md", + "version": "1.0.0" + }, + "progress": { + "refresh": "hourly GitHub Actions collection; browser checks every five minutes", + "scope": "public aien-dev project repositories, retained history", + "initial_edits": "Dashboard draft predates explicit Crumb reminder; subsequent integration is claimed and recorded." + } + }, + "below": [ + { + "name": "crates/site-builder", + "role": "Build the website with Rust and Maud" + }, + { + "name": "scripts", + "role": "Collect and validate retained public GitHub history" + }, + { + "name": "public", + "role": "Serve static browser assets and measured JSON" + }, + { + "name": ".github/workflows", + "role": "Verify and deploy the site on pushes and hourly collection" + } + ] +} diff --git a/.github/.crumb b/.github/.crumb new file mode 100644 index 00000000..78a5d656 --- /dev/null +++ b/.github/.crumb @@ -0,0 +1,14 @@ +{ + "schema_version": "1.0.0", + "name": ".github", + "layer": "website", + "purpose": "GitHub automation configuration", + "above": { + "name": "aienos.com", + "path": ".." + }, + "invariants": [ + "Never commit .crumb.local or credentials.", + "Report retained public repository evidence; do not equate code size, test files or CI runs with verified capability." + ] +} diff --git a/.github/workflows/.crumb b/.github/workflows/.crumb new file mode 100644 index 00000000..57f7ad8c --- /dev/null +++ b/.github/workflows/.crumb @@ -0,0 +1,14 @@ +{ + "schema_version": "1.0.0", + "name": ".github/workflows", + "layer": "website", + "purpose": "Test, collect public project metrics and deploy the GitHub Pages site", + "above": { + "name": ".github", + "path": ".." + }, + "invariants": [ + "Never commit .crumb.local or credentials.", + "Report retained public repository evidence; do not equate code size, test files or CI runs with verified capability." + ] +} diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 5c037364..a2e49252 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,5 +1,7 @@ name: pages on: + schedule: + - cron: "17 * * * *" workflow_dispatch: push: branches: [main] @@ -17,6 +19,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + - name: Verify measurement boundaries + run: node --test scripts/collect-progress.test.mjs + - name: Collect public project history + if: github.event_name != 'pull_request' + env: + GITHUB_TOKEN: ${{ github.token }} + run: node scripts/collect-progress.mjs - name: Run verification test suite run: cargo test --verbose --manifest-path crates/site-builder/Cargo.toml - name: Build static site with pure Rust engine diff --git a/.gitignore b/.gitignore index ecb6f380..cda70753 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,7 @@ server/*.sqlite3* /target Cargo.lock dist-rust + +# Ephemeral RFC-0001 coordination and local measurement mirrors +.crumb.local +.progress-cache/ diff --git a/README.md b/README.md index 1f9a1ced..1552e0ea 100644 --- a/README.md +++ b/README.md @@ -74,3 +74,22 @@ Funnel route must forward `/aienos-waitlist` to the local listener. ## License Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE). The runtime itself, aien-sovereign-core, is Apache-2.0 with LLVM Exception. Project values live in the nonbinding [COVENANT.md](https://github.com/aien-dev/aien-sovereign-core/blob/main/COVENANT.md), which grants and restricts no legal rights. + +## Project progress dashboard + +[Progress](https://www.aienos.com/progress/) is built by the existing Rust generator. It plots daily default-branch snapshots from the beginning of the retained public project history, exact-content-deduplicated physical source lines, named test-file footprint, distinct reachable commit SHAs, all PRs and available GitHub Actions runs. These metrics measure repository activity, not qualification or individual executed tests. + +The Pages workflow collects on pushes to main, manual runs, and hourly at minute 17 (UTC). GitHub can delay scheduled runs. The browser checks the published JSON every five minutes, preserves a selected historical day and marks snapshots older than three hours. Collection and reconciliation must succeed before deployment; a failed refresh retains the last good live page. Collection uses the built-in read-only Actions token against public endpoints; no token is shipped to browsers and no generated hourly commits are made. PR builds use the committed snapshot. + +```bash +node --test scripts/collect-progress.test.mjs +node scripts/collect-progress.mjs +cargo test --manifest-path crates/site-builder/Cargo.toml +cargo run --release --manifest-path crates/site-builder/Cargo.toml -- build dist +``` + +Source boundaries, exclusions and the initial public repository allowlist are in scripts/collect-progress.mjs. Newly discovered project-named public repositories are included automatically; forks/private repositories are excluded. The JSON includes the collection timestamp and every measured default-branch head. Deleted CI records cannot be reconstructed. Historical milestones and experiment examples are curated and linked to evidence; recent PR activity is collected automatically. D3 7.9.0 is self-hosted with its ISC license in public/vendor/. + +### Crumb coordination + +This integration adopts [RFC-0001](https://github.com/aien-dev/crumb-spec/blob/10b8251/SPEC.md), following the [current protocol pointer](https://github.com/aien-dev/aien-architecture/blob/main/docs/CRUMB_PROTOCOL.md). Durable .crumb files describe the changed directory boundaries. Using the canonical aien-architecture/tools/crumb tool: sniff before edits, respect unexpired locks, claim multi-step work, then close with the result. .crumb.local is ephemeral, ignored and excluded from the public site. Adoption started after the initial dashboard draft; the coordination record does not claim earlier edits were locked. diff --git a/crates/.crumb b/crates/.crumb new file mode 100644 index 00000000..e962a23c --- /dev/null +++ b/crates/.crumb @@ -0,0 +1,14 @@ +{ + "schema_version": "1.0.0", + "name": "crates", + "layer": "website", + "purpose": "Native Rust website crates", + "above": { + "name": "aienos.com", + "path": ".." + }, + "invariants": [ + "Never commit .crumb.local or credentials.", + "Report retained public repository evidence; do not equate code size, test files or CI runs with verified capability." + ] +} diff --git a/crates/site-builder/.crumb b/crates/site-builder/.crumb new file mode 100644 index 00000000..137967a9 --- /dev/null +++ b/crates/site-builder/.crumb @@ -0,0 +1,14 @@ +{ + "schema_version": "1.0.0", + "name": "crates/site-builder", + "layer": "website", + "purpose": "Rust static site generator", + "above": { + "name": "crates", + "path": ".." + }, + "invariants": [ + "Never commit .crumb.local or credentials.", + "Report retained public repository evidence; do not equate code size, test files or CI runs with verified capability." + ] +} diff --git a/crates/site-builder/src/.crumb b/crates/site-builder/src/.crumb new file mode 100644 index 00000000..d272294d --- /dev/null +++ b/crates/site-builder/src/.crumb @@ -0,0 +1,14 @@ +{ + "schema_version": "1.0.0", + "name": "crates/site-builder/src", + "layer": "website", + "purpose": "Page assembly and site build verification", + "above": { + "name": "crates/site-builder", + "path": ".." + }, + "invariants": [ + "Never commit .crumb.local or credentials.", + "Report retained public repository evidence; do not equate code size, test files or CI runs with verified capability." + ] +} diff --git a/crates/site-builder/src/components/.crumb b/crates/site-builder/src/components/.crumb new file mode 100644 index 00000000..34247895 --- /dev/null +++ b/crates/site-builder/src/components/.crumb @@ -0,0 +1,17 @@ +{ + "schema_version": "1.0.0", + "name": "crates/site-builder/src/components", + "layer": "website", + "purpose": "Reusable page content and navigation", + "above": { + "name": "crates/site-builder/src", + "path": ".." + }, + "invariants": [ + "Never commit .crumb.local or credentials.", + "Report retained public repository evidence; do not equate code size, test files or CI runs with verified capability." + ], + "exports": [ + "progress::render_progress_page: source-backed project history page" + ] +} diff --git a/crates/site-builder/src/components/footer.rs b/crates/site-builder/src/components/footer.rs index d32fbc33..b8da16ad 100644 --- a/crates/site-builder/src/components/footer.rs +++ b/crates/site-builder/src/components/footer.rs @@ -58,7 +58,8 @@ pub const FOOTER_GROUPS: [(&str, &[FooterLink]); 6] = [ ]; /// Secondary links, after the six sections. -const FOOTER_MORE: [FooterLink; 5] = [ +const FOOTER_MORE: [FooterLink; 6] = [ + ("Progress", "/progress/", false), ("Blog", "/blog", false), ("Waitlist", "/#waitlist", false), ("Licensing", "/licensing/", false), diff --git a/crates/site-builder/src/components/mod.rs b/crates/site-builder/src/components/mod.rs index a982c3c9..69b6c702 100644 --- a/crates/site-builder/src/components/mod.rs +++ b/crates/site-builder/src/components/mod.rs @@ -11,6 +11,7 @@ pub mod machine; pub mod matrix; pub mod narrative; pub mod navbar; +pub mod progress; pub mod research; pub mod research_status; pub mod status; diff --git a/crates/site-builder/src/components/navbar.rs b/crates/site-builder/src/components/navbar.rs index c3ebaf76..434c0e9f 100644 --- a/crates/site-builder/src/components/navbar.rs +++ b/crates/site-builder/src/components/navbar.rs @@ -14,7 +14,8 @@ pub const NAV_PRIMARY: [(&str, &str); 6] = [ ]; /// Secondary links: smaller, after a divider. -pub const NAV_SECONDARY: [(&str, &str); 3] = [ +pub const NAV_SECONDARY: [(&str, &str); 4] = [ + ("Progress", "/progress/"), ("Blog", "/blog"), ("Waitlist", "/#waitlist"), ("GitHub", "https://github.com/aien-dev"), diff --git a/crates/site-builder/src/components/progress.rs b/crates/site-builder/src/components/progress.rs new file mode 100644 index 00000000..187601b2 --- /dev/null +++ b/crates/site-builder/src/components/progress.rs @@ -0,0 +1,27 @@ +use maud::{Markup, PreEscaped}; + +pub fn render_progress_page() -> Markup { + let raw = include_str!("../../../../public/data/project-progress.json"); + let data: serde_json::Value = serde_json::from_str(raw).expect("Valid project progress dataset"); + let summary = &data["summary"]; + let mut body = include_str!("../../templates/progress.html").to_string(); + for (marker, key) in [("__LINES__", "loc"), ("__REVISIONS__", "commits"), ("__CI__", "ci")] { + let value = summary[key].as_u64().expect("Progress metric must be a nonnegative integer"); + body = body.replace(marker, &value.to_string()); + } + // GitHub titles are untrusted strings; escaping '<' prevents closing the JSON script element. + let safe_data = raw.replace('<', "\\u003c"); + body = body.replace("__DATA__", &format!("")); + PreEscaped(body) +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn progress_is_a_real_page_with_the_same_published_measurements() { + let page = render_progress_page().into_string(); + assert!(page.contains("
Measured history across the public AIEN repositories
+August is retained site history. September 19 is the runtime's first recorded release; its initial import already contains substantial code.
+ +Named test files, deduplicated by contents. Inline tests remain in the general source count.
C includes headers and .inc files; other languages include shell, assembly, web, Mojo, Python and CUDA.
0 unclassified · silicon reruns NOT_RUN
Omega #172| Repository | Source lines | Revisions | PRs | CI runs |
|---|
Rows count each repository independently. The project total deduplicates exact matching file contents across repositories, so rows do not sum to the headline.
+Scope: the original 29 public AIEN repositories, including archived precursors, experimental projects, documentation and project websites; newly discovered public AIEN, Spark, Omega, Atlas, Physics and related named repositories are added automatically. Forks are excluded. Private repositories, unrelated private applications, unmerged branches, deleted history and work before the retained imports are excluded.
+Lines: physical source lines, including blanks and comments, in Rust, C/headers/.inc, C++, Mojo, assembly, shell, Python, web, CUDA and Zig files. Evidence, receipts, data, fixture directories, generated/build/vendor trees and symlinks are excluded. Exact matching blobs are counted once per daily snapshot. Similar migrated copies can remain. Test classification follows file-path names; embedded tests are not separated. This is repository footprint, not original authored SLOC.
+Revisions: distinct commit SHAs reachable from the pinned default branches, including merges. Snapshots use the latest first-parent state at each Chicago day end. Pull requests include all states; merged counts use the merge date. CI counts use available GitHub Actions records, deduplicated by run URL and limited to the measurement cutoff. Deleted CI records cannot be reconstructed; a run is a workflow execution, not an individual test case.
+Charts connect daily observations. Hover values between observations are interpolated; the date scrubber and headline counts use exact daily snapshots. The latest day ends at the measurement cutoff. Collection runs hourly through GitHub Actions and on site updates; scheduled runs can be delayed. This page checks for published data every five minutes. An unsuccessful collection leaves the previous deployment intact.
+There is no comparable project-wide count of individual executed tests: assertions, input sweeps, fuzz iterations and qualification gates measure different things. Reported evidence above is linked to its PR and applies to its candidate. These measurements inspect Git history and GitHub records; they do not rerun the reported runtime experiments or observe hardware. code growth and CI activity do not establish full-system qualification.
+ + +'+esc(e.detail)+'
'+esc(e.repo)+(e.pr?' #'+e.pr:' · first retained commit')+''+r.head.slice(0,10)+'Recent activity will appear after the next collection.
'; + root.querySelector('#ag-asof').textContent='Measurement cutoff: '+new Intl.DateTimeFormat('en-US',{dateStyle:'long',timeStyle:'short',timeZone:'America/Chicago'}).format(new Date(data.asof))+' America/Chicago. Default branches were read and pinned during collection.'; + root.querySelector('#ag-secondary-counts').textContent='Additional footprint: '+fmt.format(data.summary.files)+' distinct source blobs, '+fmt.format(data.summary.docfiles)+' distinct documentation blobs and '+fmt.format(data.summary.docs)+' documentation lines (excluded from source totals). Available CI conclusions at collection: '+fmt.format(data.ciConclusions.success||0)+' success, '+fmt.format(data.ciConclusions.failure||0)+' failure; remaining records were cancelled, skipped or unfinished. These are workflow outcomes, not unique correctness verdicts.'; + updateSelection(); + + + return {destroy(){charts.forEach(c=>c.observer.disconnect());},date(){return selected===days.length-1?null:days[selected].date;}}; +} + +(function startProgress(){ + const root=document.getElementById('aien-growth-observatory');if(!root)return; + let data=JSON.parse(root.querySelector('#ag-data').textContent),view,busy=false,error=false; + const template=root.innerHTML; + function freshness(){ + const age=Math.max(0,Date.now()-Date.parse(data.asof)); + const stamp=new Intl.DateTimeFormat('en-US',{month:'short',day:'numeric',hour:'numeric',minute:'2-digit',timeZoneName:'short',timeZone:'America/Chicago'}).format(new Date(data.asof)); + const node=root.querySelector('#ag-freshness');node.dataset.stale=String(age>3*3600000||error); + node.textContent=(error?'Update check unavailable · ':age>3*3600000?'Older snapshot · ':'Collected · ')+stamp; + } + function display(date){ + view?.destroy();root.innerHTML=template;view=renderProgress(data,date);freshness(); + root.querySelector('#ag-refresh').addEventListener('click',()=>refresh(true)); + } + function valid(next){ + if(!next||!Array.isArray(next.series)||!next.series.length||!Array.isArray(next.repos)||!next.repos.length||!Number.isFinite(Date.parse(next.asof)))throw Error('Invalid snapshot'); + const last=next.series.at(-1); + for(const key of ['loc','commits','ci','testfiles'])if(!Number.isSafeInteger(last[key])||last[key]<0||next.summary[key]!==last[key])throw Error('Invalid metric'); + const urls=[...(next.events||[]),...(next.activity||[])].map(p=>p.url); + for(const url of urls)if(!/^https:\/\/github\.com\/aien-dev\/[A-Za-z0-9_.\/-]+$/.test(url))throw Error('Invalid source URL'); + for(const repo of next.repos)if(!/^[.A-Za-z0-9_-]+$/.test(repo.name)||!/^[a-f0-9]{40}$/.test(repo.head))throw Error('Invalid source pin'); + return next; + } + async function refresh(manual=false){ + if(busy)return;busy=true;const button=root.querySelector('#ag-refresh');button.disabled=true;button.textContent='Checking…'; + try{ + const response=await fetch('/data/project-progress.json?check='+Date.now(),{cache:'no-store',signal:AbortSignal.timeout(20000)}); + if(!response.ok)throw Error('Unavailable');const next=valid(await response.json()); + if(Date.parse(next.asof)>Date.parse(data.asof)){const date=view.date();data=next;display(date);} + error=false;freshness();if(manual)root.querySelector('#ag-refresh').textContent='Up to date'; + }catch(e){error=true;freshness();} + finally{busy=false;root.querySelector('#ag-refresh').disabled=false;if(!manual||error)root.querySelector('#ag-refresh').textContent='Check for updates';} + } + valid(data);display();refresh();setInterval(()=>{freshness();if(!document.hidden)refresh();},5*60000); + document.addEventListener('visibilitychange',()=>{if(!document.hidden)refresh();}); +})(); diff --git a/public/licensing/.crumb b/public/licensing/.crumb new file mode 100644 index 00000000..f08d5c6d --- /dev/null +++ b/public/licensing/.crumb @@ -0,0 +1,6 @@ +{ + "schema_version": "1.0.0", + "name": "public/licensing", + "layer": "website", + "purpose": "Public static research or licensing pages using the shared website navigation" +} diff --git a/public/licensing/index.html b/public/licensing/index.html index 964b6b69..9bafe08e 100644 --- a/public/licensing/index.html +++ b/public/licensing/index.html @@ -56,6 +56,7 @@0?d[i-1]:l,v.x1=i
0)for(i=0;i=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e=i)&&(e=i)}return e}function tt(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e =0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=un);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o >1)+h+t+M+S.slice(A);break;default:t=S+h+t+M}return u(t)}return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),M.toString=function(){return t+""},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=Jc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Zc(n)/3))),i=Math.pow(10,-r),o=uf[8+r/3];return function(t){return e(i*t)+o}}}}function ff(n){return of=cf(n),t.format=of.format,t.formatPrefix=of.formatPrefix,of}function sf(t){return Math.max(0,-Zc(Math.abs(t)))}function lf(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Zc(n)/3)))-Zc(Math.abs(t)))}function hf(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Zc(n)-Zc(t))+1}t.format=void 0,t.formatPrefix=void 0,ff({thousands:",",grouping:[3],currency:["$",""]});var df=1e-6,pf=1e-12,gf=Math.PI,yf=gf/2,vf=gf/4,_f=2*gf,bf=180/gf,mf=gf/180,xf=Math.abs,wf=Math.atan,Mf=Math.atan2,Tf=Math.cos,Af=Math.ceil,Sf=Math.exp,Ef=Math.hypot,Nf=Math.log,kf=Math.pow,Cf=Math.sin,Pf=Math.sign||function(t){return t>0?1:t<0?-1:0},zf=Math.sqrt,$f=Math.tan;function Df(t){return t>1?0:t<-1?gf:Math.acos(t)}function Rf(t){return t>1?yf:t<-1?-yf:Math.asin(t)}function Ff(t){return(t=Cf(t/2))*t}function qf(){}function Uf(t,n){t&&Of.hasOwnProperty(t.type)&&Of[t.type](t,n)}var If={Feature:function(t,n){Uf(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=Tf(n=(n*=mf)/2+vf),a=Cf(n),u=Vf*a,c=Gf*o+u*Tf(i),f=u*r*Cf(i);as.add(Mf(f,c)),Xf=t,Gf=o,Vf=a}function ds(t){return[Mf(t[1],t[0]),Rf(t[2])]}function ps(t){var n=t[0],e=t[1],r=Tf(e);return[r*Tf(n),r*Cf(n),Cf(e)]}function gs(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function ys(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function vs(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function _s(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function bs(t){var n=zf(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ms,xs,ws,Ms,Ts,As,Ss,Es,Ns,ks,Cs,Ps,zs,$s,Ds,Rs,Fs={point:qs,lineStart:Is,lineEnd:Os,polygonStart:function(){Fs.point=Bs,Fs.lineStart=Ys,Fs.lineEnd=Ls,rs=new T,cs.polygonStart()},polygonEnd:function(){cs.polygonEnd(),Fs.point=qs,Fs.lineStart=Is,Fs.lineEnd=Os,as<0?(Wf=-(Kf=180),Zf=-(Qf=90)):rs>df?Qf=90:rs<-df&&(Zf=-90),os[0]=Wf,os[1]=Kf},sphere:function(){Wf=-(Kf=180),Zf=-(Qf=90)}};function qs(t,n){is.push(os=[Wf=t,Kf=t]),n t.r&&(t.r=t[n].r)}function c(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r >>1;f[g]1;)i-=2;for(let t=2;t0){if(n>=this.ymax)return null;(i=(this.ymax-n)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/e)this.xmax?2:0)|(n9999?"+"+Ku(n,6):Ku(n,4))+"-"+Ku(t.getUTCMonth()+1,2)+"-"+Ku(t.getUTCDate(),2)+(o?"T"+Ku(e,2)+":"+Ku(r,2)+":"+Ku(i,2)+"."+Ku(o,3)+"Z":i?"T"+Ku(e,2)+":"+Ku(r,2)+":"+Ku(i,2)+"Z":r||e?"T"+Ku(e,2)+":"+Ku(r,2)+"Z":"")}function Ju(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,a=0,u=0,c=o<=0,f=!1;function s(){if(c)return Hu;if(f)return f=!1,ju;var n,r,i=a;if(t.charCodeAt(i)===Xu){for(;a++=v)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,g.data),b=n-+this._y.call(null,g.data),m=_*_+b*b;if(m=u)){(t.data!==n||t.next)&&(0===l&&(p+=(l=Uc(e))*l),0===h&&(p+=(h=Uc(e))*h),p(t=(Lc*t+jc)%Hc)/Hc}();function l(){h(),f.call("tick",n),e1?(f.on(t,e),n):f.on(t)}}},t.forceX=function(t){var n,e,r,i=qc(.1);function o(t){for(var i,o=0,a=n.length;o=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[a.stream(n=e),u.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++ejs(r[0],r[1])&&(r[1]=i[1]),js(i[0],r[1])>js(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(u=js(r[1],i[0]))>a&&(a=u,Wf=i[0],Kf=r[1])}return is=os=null,Wf===1/0||Zf===1/0?[[NaN,NaN],[NaN,NaN]]:[[Wf,Zf],[Kf,Qf]]},t.geoCentroid=function(t){ms=xs=ws=Ms=Ts=As=Ss=Es=0,Ns=new T,ks=new T,Cs=new T,Lf(t,Gs);var n=+Ns,e=+ks,r=+Cs,i=Ef(n,e,r);return idayFormatter.format(new Date(timestamp));
+export function classify(file,mode='100644'){
+ if(mode==='120000'||excluded.test(file))return null;
+ const ext=path.posix.extname(file),lang=extensions.get(ext);
+ if(lang)return {kind:testPath.test(file)?'test':'source',lang};
+ if(['.md','.rst','.txt'].includes(ext.toLowerCase())&&!/LICENSE|NOTICE|COPYING/.test(file))return {kind:'docs',lang:'Docs'};
+ return null;
+}
+export function physicalLines(bytes){
+ if(bytes.includes(0))return 0;
+ let lines=0;for(const byte of bytes)if(byte===10)lines++;
+ return lines+(bytes.length&&bytes.at(-1)!==10?1:0);
+}
+export function countEntries(entries,blobLines,seen=new Set()){
+ const counts={source:0,test:0,docs:0,files:0,testfiles:0,docfiles:0,langs:{}};
+ for(const e of entries){
+ if(seen.has(e.oid))continue;seen.add(e.oid);
+ const lines=blobLines.get(e.oid);if(!Number.isSafeInteger(lines)||lines<0)throw Error('Invalid blob line count');
+ counts[e.kind]+=lines;
+ if(e.kind==='docs')counts.docfiles++;
+ else{counts.files++;if(e.kind==='test')counts.testfiles++;counts.langs[e.lang]=(counts.langs[e.lang]||0)+lines;}
+ }
+ return counts;
+}
+export function validateSnapshot(data){
+ const required=['source','test','docs','loc','files','testfiles','docfiles','repos','commits','prs','merged','ci'];
+ if(!data.series?.length||!data.repos?.length||!Number.isFinite(Date.parse(data.asof)))throw Error('Empty or invalid snapshot');
+ let prev='';
+ for(const row of data.series){
+ if(!/^\d{4}-\d{2}-\d{2}$/.test(row.date)||row.date<=prev)throw Error('Unordered snapshot dates');prev=row.date;
+ for(const key of required)if(!Number.isSafeInteger(row[key])||row[key]<0)throw Error('Missing or invalid metric: '+key);
+ if(row.loc!==row.source+row.test||row.merged>row.prs||row.testfiles>row.files)throw Error('Snapshot totals do not reconcile');
+ if(Object.values(row.langs).reduce((a,b)=>a+b,0)!==row.loc)throw Error('Language total mismatch');
+ }
+ const latest=data.series.at(-1);
+ for(const key of required)if(data.summary[key]!==latest[key])throw Error('Summary differs from the latest snapshot: '+key);
+ if(new Set(data.repos.map(r=>r.name)).size!==data.repos.length)throw Error('Duplicate repositories');
+ if(data.summary.prs!==data.repos.reduce((s,r)=>s+r.prCount,0))throw Error('PR totals do not reconcile');
+ if(data.summary.ci!==data.repos.reduce((s,r)=>s+r.ciCount,0))throw Error('CI totals do not reconcile');
+ if(data.summary.ci!==Object.values(data.ciConclusions).reduce((s,c)=>s+c,0))throw Error('CI conclusions do not reconcile');
+ for(const repo of data.repos)if(!/^[a-f0-9]{40}$/.test(repo.head))throw Error('Missing pinned head');
+ return data;
+}
+
+const pause=ms=>new Promise(resolve=>setTimeout(resolve,ms));
+export async function githubGet(endpoint,fetcher=fetch){
+ const headers={Accept:'application/vnd.github+json','X-GitHub-Api-Version':'2022-11-28','User-Agent':'AIEN-Project-Progress'};
+ if(process.env.GITHUB_TOKEN)headers.Authorization='Bearer '+process.env.GITHUB_TOKEN;
+ for(let attempt=0;attempt<4;attempt++){
+ const response=await fetcher('https://api.github.com'+endpoint,{headers,signal:AbortSignal.timeout(60000)});
+ if(response.ok)return response.json();
+ if((response.status===429||response.status>=500)&&attempt<3){await pause(2000*(attempt+1));continue;}
+ throw Error(`GitHub refused ${endpoint}: HTTP ${response.status}`);
+ }
+}
+export async function paginate(endpoint,key=null,get=githubGet){
+ const records=new Map();
+ for(let page=1;page<=10000;page++){
+ const response=await get(endpoint+(endpoint.includes('?')?'&':'?')+'per_page=100&page='+page);
+ const rows=key?response[key]:response;
+ if(!Array.isArray(rows))throw Error('Invalid GitHub collection: '+endpoint);
+ for(const row of rows)records.set(row.id??row.url??row.number,row);
+ if(rows.length<100)return [...records.values()];
+ }
+ throw Error('Pagination exceeded the supported limit');
+}
+const git=(dir,args,binary=false,input)=>execFileSync('git',['--git-dir='+dir,...args],{encoding:binary?null:'utf8',input,maxBuffer:256*1024*1024});
+const command=(exe,args)=>new Promise((resolve,reject)=>{
+ const process=spawn(exe,args,{stdio:['ignore','ignore','pipe']});let error='';
+ process.stderr.on('data',chunk=>error=(error+chunk).slice(-3000));
+ process.on('error',reject);process.on('close',code=>code===0?resolve():reject(Error(exe+' failed: '+error)));
+});
+async function limited(items,limit,fn){
+ const results=new Array(items.length);let i=0;
+ await Promise.all(Array.from({length:Math.min(limit,items.length)},async()=>{while(i