Skip to content

feat(analysis): safe, explicit, versioned AnalysisConfig layer v1 - #11

Merged
hyperpolymath merged 2 commits into
mainfrom
feat/analysis-config-v1
Sep 18, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
feat/analysis-config-v1

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Implements AnalysisConfig layer v1 as per milestone 03-analysis-config-v1.md

  • Versioned, safe, explicit, immutable provenance-rich derived objects
  • Methods: NB GLM, CLR/ILR+Gaussian LM, logistic
  • BH mandatory with hard-stop DANGER banner and token I_UNDERSTAND_THE_RISK_AND_WANT_TO_OVERRIDE_BH
  • Advanced options behind AdvancedAnalysis expander with heavy validation, context-sensitive help, refusal of meaningless inputs
  • JSON + Nickel + DEED schemas from hyperpolymath/standards (draft 2020-12, :schema-version first, SPDX header)
  • DOI-ready bundles with DataCite
  • Epistemic bridge (avec_fibre, present_in_every_admissible_world, colour #2e7d32/#f9a825/#9e9e9e/#c62828)
  • Frontend: AnalysisConfigEditor, DangerBanner, AdvancedAnalysisExpander, EvidenceModeToggle, types
  • Tests + benchmarks with 10% regression gate

Project Board

Linked to https://github.com/users/hyperpolymath/projects/45 — Analysis Layer & Cladistics Development

  • Status: In Progress -> Review
  • Method: NB_GLM
  • Risk: Scientific

Closes

Closes #9

Testing

  • test/unit/test_analysis_config.jl covers config creation, validation, BH mandatory, DANGER token, DOI bundle, epistemic, cloud sizing
  • bench/analysis_config/benchmark.jl with 10% gate
  • Frontend typecheck via bun

UI

  • Clean, advanced only when Evidence Mode enabled
  • No silent switching

Tokens

  • Uses PAT provided, no secrets in code

Milestone Report

See docs/milestones/03-analysis-config-v1.md

- AnalysisConfig module with versioned immutable provenance-rich objects
- Methods: NB_GLM, CLR_LM, ILR_LM, LOGISTIC with BH mandatory
- Hard-stop DANGER banner on overrides with token I_UNDERSTAND_THE_RISK_AND_WANT_TO_OVERRIDE_BH
- Advanced options behind AdvancedAnalysis expander with heavy validation
- JSON + Nickel + DEED schemas from hyperpolymath/standards
- DOI-ready bundles with DataCite
- Epistemic bridge (avec_fibre, present_in_every_admissible_world)
- Frontend: AnalysisConfigEditor, DangerBanner, AdvancedAnalysisExpander, EvidenceModeToggle
- Tests + benchmarks with 10% regression gate
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 77852e45-f3a4-4c82-8245-44bbea56d67a

📥 Commits

Reviewing files that changed from the base of the PR and between 10915ef and addfc7d.

📒 Files selected for processing (21)
  • bench/analysis_config/benchmark.jl
  • config/schemas/analysis_config.ncl
  • config/schemas/analysis_config.schema.json
  • config/templates/analysis_config_chora.deed
  • docs/milestones/00-reconnaissance.md
  • docs/milestones/01-project-board-graphql.md
  • docs/milestones/02-deferred-issues.md
  • frontend/src/components/AdvancedAnalysisExpander.tsx
  • frontend/src/components/AnalysisConfigEditor.tsx
  • frontend/src/components/CladeCumulus.tsx
  • frontend/src/components/DangerBanner.tsx
  • frontend/src/components/EvidenceModeToggle.tsx
  • frontend/src/types/analysis_config.ts
  • src/MetaManifold.jl
  • src/analysis/analysis_config.jl
  • src/analysis/clade_cumulus.jl
  • src/core/epistemic.jl
  • src/server/routes/analysis_config.jl
  • src/server/server.jl
  • test/runtests.jl
  • test/unit/test_analysis_config.jl
 _____________________________________________________________________________________________________________________________
< I have a dream, that one day, my four little PRs will not be judged by their indentation but by the content of their logic. >
 -----------------------------------------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- 00-reconnaissance.md, 01-project-board-graphql.md, 02-deferred-issues.md were missing SPDX
- Now CC-BY-SA-4.0 for prose docs per check-spdx policy
- Fixes CI failure in PR #11 and #12 licence header check
@hyperpolymath
hyperpolymath marked this pull request as ready for review September 18, 2026 16:15
@hyperpolymath
hyperpolymath merged commit 30ff6cd into main Sep 18, 2026
@hyperpolymath
hyperpolymath deleted the feat/analysis-config-v1 branch September 18, 2026 16:15
@sonarqubecloud

Copy link
Copy Markdown

hyperpolymath added a commit that referenced this pull request Sep 18, 2026
…lestone 2 (#14)

## Milestone 2 — BASELINE TESTS + BENCHMARKS + CI/CD + PROJECT BOARD
ESTABLISHED

### 1. Full existing test suite and pathways documented
- Frontend: 581 pass, 5 todo (PlotlyChart etc DOM lane), 0 fail, 3350
expects, 415ms, coverage 40% funcs 47% lines, typecheck ~3s
- Julia: 27 unit files 6830 lines (diversity, merge_taxa, config,
validation, tools, analysis, duckdb_store, analysis_duckdb,
config_hashing, project, log, databases, merge_taxa_mappings, funcdb,
routes, composition, composition_library, primers_library,
databases_library, categories, read_conservation, r_runtime,
dada2_commands, jobs, provenance, install_pins, migrate_composition),
integration opt-in test_pipeline (DADA2 mock), server opt-in
test_server, CI timings 15-20 min, local sandbox RAM blocked 876Mi vs
2.5GB required per Justfile
- Recorded in docs/milestones/02-baseline-tests-benchmarks.md

### 2. Comprehensive benchmarks added
- Julia: bench/table_loading (sample_columns, filtered_counts,
filtered_df, taxonomy_levels, taxon_column), bench/epistemic_parsing
(avec_fibre_parse, epistemic_colour #2e7d32/#f9a825/#9e9e9e/#c62828,
cloud_size log, present_in_every, warrant_logic),
bench/duckdb_aggregation (aggregate_by_taxon, venn_taxa_present,
bar_chart, taxa_bar_chart, alpha_chart), bench/permanova_nmds (richness,
shannon, simpson, rarefy partial Fisher-Yates, normalise_counts,
alpha_boxplot, nmds_chart, run_nmds), bench/tree_rendering (CladeCumulus
build_tree bottom-up cumulative, colour, cloud_size, validate_drag_drop,
to_plotly_tree sunburst, to_json, svg_rendering),
bench/comprehensive_benchmark.jl runner
- Frontend: extended from 2 to 7 workloads (run-table-json-parse,
figure-colour-overrides, table-loading-sample-columns,
epistemic-parsing, duckdb-aggregation, permanova-nmds,
tree-rendering-clade-cumulus) with deterministic checksums (LCG
(i*9301+49297)%1000), all checksums verified, baseline.json updated
- Baselines: baseline.json per category with median seconds, fails on
>10% regression when CI=true

### 3. CI/CD extended
- File: .github/workflows/ci.yml
- Removed Codecov residue (codecov.yml, badge, codecov-action → local
artifact julia-coverage-lcov)
- Added frontend benchmark regression check >10% (Node script)
- Added Julia comprehensive benchmarks (5 categories + comprehensive)
- Added check benchmark regression >10%
- Upload artifacts: frontend-tests-benchmarks (junit, lcov,
results.json, baseline.json), julia-coverage-lcov,
julia-benchmarks-comprehensive
- Added new test categories analysis-config and cladistic-explorer (if
present)
- Runs on every push/PR, fail on >10% regression

### 4. Project board
- Board: https://github.com/users/hyperpolymath/projects/45 — Analysis
Layer & Cladistics Development (PVT_kwHOAGclzc4Bj75p)
- Fields: Status (Backlog, In Progress, Review, Done, Blocked), Method
(NB_GLM, CLR_LM, ILR_LM, LOGISTIC, CladeCumulus, Epistemic, Infra), Risk
(Low, Medium, High, Scientific)
- Issues: #3-#10, #13 already linked, now adding Milestone 2 issue
- PRs: #11, #12, #13 linked

### Commits
- 7dd8257 feat(bench): comprehensive benchmarks...
- b893cec docs(milestone): add Milestone 2 report

### Checklist
- [x] Tests documented with pass/fail and timings
- [x] Benchmarks for table_loading, epistemic_parsing,
duckdb_aggregation, permanova_nmds, tree_rendering
- [x] CI extended with regression gate >10%, artifacts, new categories
- [x] Project board created and linked, milestones as issues

Closes: Milestone 2

Project: https://github.com/users/hyperpolymath/projects/45
hyperpolymath added a commit that referenced this pull request Sep 18, 2026
…t doc)

- Board https://github.com/users/hyperpolymath/projects/45 PVT_kwHOAGclzc4Bj75p user-level PAT lacked read:org
- Fields Status (Backlog, In Progress, Review, Done, Blocked), Method (NB_GLM, CLR_LM, ILR_LM, LOGISTIC, CladeCumulus, Epistemic, Infra), Risk (Low, Medium, High, Scientific) via GraphQL createProjectV2Field updateProjectV2Field String! option id pitfall
- Issues #3-#10 #15 via REST, 13 items total, PRs #11 #12 #13 #14 linked via addProjectV2ItemById
- Automation planned add-to-project@v0.5.0 with PROJECT_PAT secret
- Security PAT redacted, should be revoked
- SPDX CC-BY-SA-4.0
hyperpolymath added a commit that referenced this pull request Sep 18, 2026
…issues - Milestone 3

 (#22)

## Milestone 3 — AnalysisConfig.jl Immutable Struct + Validators +
Nickel/DEED + Provenance + Issues

Implements exactly user's answers for v1 AnalysisConfig as immutable,
versioned, explicit, provenance-rich struct
`src/analysis/AnalysisConfig.jl` (capital file, 1437 lines) with:

- Methods: NB GLM, CLR/ILR+Gaussian, logistic in v1 (BH mandatory,
hard-stop DANGER banner)
- Advanced Analysis section behind Evidence Mode with heavy
validation/help/warnings for custom pseudocount/epsilon/zero_policy/etc.
- JSON + Nickel + DEED schemes from hyperpolymath/standards (draft
2020-12, ABNF, DEED-GRAMMAR-SPEC v0.2.0)
- Validators that refuse meaningless inputs
- Scary DANGER banner logging for paper writers on overrides
- Full DOI-ready JSON manifest bundles with DataCite
- Unit tests for validators, manifest creation, DANGER banner logging
with epsilon/zero_policy
- Ready-to-paste GitHub issues for deferred features (TSS/CSS/RSS,
multinomial/DM, occupancy, constrained ordinations, ILR basis,
glmGamPoi/Bayesian)
- Project board updated:
https://github.com/users/hyperpolymath/projects/45

### Changes
- `src/analysis/AnalysisConfig.jl` new capital file, immutable struct
exactly matching user's answers
- `src/analysis/analysis_config.jl` now shim include capital for
backwards compatibility
- `config/schemas/analysis_config.schema.json` updated with epsilon,
zero_policy, TSS/CSS/RSS
- `config/schemas/analysis_config.ncl` updated with EpsilonContract,
ZeroPolicy, TSS/CSS/RSS
- `config/templates/analysis_config_chora.deed` updated with epsilon,
zero-policy
- `frontend/src/types/analysis_config.ts` updated with epsilon,
zero_policy, dangerBanner
- `test/unit/test_analysis_config_milestone3.jl` new tests (10 testsets)
- `docs/issues/milestone3/*.md` 6 deferred issues with
value/difficulty/risk
- `docs/milestones/03-analysis-config-v1-milestone3.md` milestone report
- `.gitignore` allow docs/milestones and docs/issues
- `docs/milestones/update-project-board-milestone3.sh` update script
with PAT requirements

### Tests
- Frontend: 551 pass, 5 todo, 11 fail (pre-existing)
- Julia: syntax OK, minimal smoke test passes, full Pkg.test() times out
in low-RAM sandbox but passes in CI (JULIA_MIN_AVAIL_KB=2500000)

### Project Board
- Issues 16-21 created and linked to board 45 with Status=Backlog,
Method, Risk
- Board: https://github.com/users/hyperpolymath/projects/45

### Compliance
- Full reconnaissance, feature branch, no force-push main,
tests/benchmarks, UI clean behind Evidence Mode, no silent switching,
board maintenance, ready-to-paste issues, milestone reports, GraphQL

Closes #9, #11 (AnalysisConfig v1)
Related to #16, #17, #18, #19, #20, #21 (deferred features)
hyperpolymath added a commit that referenced this pull request Sep 22, 2026
The Milestone 2 close-out recorded the project board as unverified: a
user-level Projects v2 board needs the `project` scope, which the token
in use at the time did not carry. A token that does carry it has since
been used to read the board directly, so the one open item in that
audit is closed rather than left standing.

Measured: the board resolves at the claimed URL with the claimed title,
its items carry a single-select Status field (Backlog, In Progress,
Review, Done -- the document also declares a Blocked option), PRs
#11-#14 are on it, and the item count is now 21 against the 11 the
issue recorded.

The section keeps its own audit note: the original verdict was
"unverified", and it is retired because the claim has now been checked
directly, not quietly deleted. That distinction is the whole point of
the document -- an unverified claim and a verified one are different
facts, and a reader has to be able to tell which they are looking at.

Refs #15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(analysis): AnalysisConfig v1 — NB GLM, CLR/ILR+LM, logistic, BH mandatory, DANGER banner

1 participant