Skip to content

refactor: contract CANFAR interfaces while preserving behavior - #276

Open
shinybrar wants to merge 142 commits into
mainfrom
feat/interfaces
Open

refactor: contract CANFAR interfaces while preserving behavior#276
shinybrar wants to merge 142 commits into
mainfrom
feat/interfaces

Conversation

@shinybrar

@shinybrar shinybrar commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Outcome

Contracts CANFAR internal interfaces and removes redundant machinery while preserving the shipped Python API, CLI, Configuration data, authentication, HTTP, Session, storage, logging, packaging, and documentation behavior.

Net epic change: 320 files, 9,069 insertions, 16,706 deletions across 142 commits; net reduction of 7,637 lines.

Highlights

  • keep native httpx Client and AsyncClient implementations while sharing request, response, filtering, logging, credential, and OIDC policy
  • preserve Session and AsyncSession signatures and return shapes; keep ps as a thin CLI operation over fetch
  • make config.editor the editing surface and apply related domain transitions atomically
  • split registry, VOSI, storage, transport, and enrichment implementation behind the stable canfar.server interface
  • flatten canonical CLI commands and add leaf -o/--output json or yaml with strict create -- handling and data-only stdout
  • expose explicit storage identifiers and filesystem resolution without dynamic protocol registration or automatic persistent caching
  • modernize X.509 handling, consolidate CI, and simplify test surfaces around public CliRunner and httpx MockTransport contracts
  • replace ALMA screenshots with text-first workflows and audit all documentation for truthful APIs, links, navigation, examples, and buildability
  • retain Overview, funny.name and its packaged scientist wordlist, distributed helpers, and Hatch force-include

Compatibility guarantees

  • public Session and AsyncSession method contracts and raw Python return values remain unchanged
  • persisted Configuration shape remains readable and stable
  • native synchronous behavior does not depend on an event loop
  • machine JSON and YAML output remains filtered, data-only, and derived from the same Python or Pydantic result
  • runtime bearer tokens and certificates retain precedence over saved Authentication Records and refresh hooks
  • public canfar.server discovery, enrichment, and error imports remain available

Review

  • Standards, Specification, and Simplify reviews were run after every implementation wave
  • final Standards, Specification, Thermonuclear, Ponytail, Deslop, Architecture, and Simplify reviews are clean
  • all github-code-quality review threads were addressed with focused commits, replied to, and resolved

Validation

  • GitHub CI passes across Python 3.10 through 3.14
  • CodeQL, dependency review, and pre-commit checks pass
  • 844 deterministic non-slow tests pass locally
  • Ruff, ty, uv lock validation, and git diff checks pass
  • MkDocs builds successfully; the only message is the known external git-committers API rate-limit warning
  • wheel and sdist build successfully and include funny.py plus scientists.txt; funny.name runs from the built wheel

The credential-dependent full integration suite was not run because no live CANFAR Authentication Record and certificate were available, per repository policy.

Closes #244.

shinybrar and others added 30 commits August 17, 2026 15:10
ci: gate full tests on merged code changes
fix(ci): address Wave 0 review findings
feat(config): establish bound Configuration editor
refactor(auth): modernize X.509 validation APIs
refactor(sessions): share native transport policy
refactor(ci): consolidate reusable workflows
docs(alma): replace screenshot guides with text workflow
shinybrar and others added 19 commits August 18, 2026 01:20
Integrate the final platform and site documentation lane for #261 into feat/interfaces.
Integrate the Wave 7 ps status-filter help correction into feat/interfaces.
Integrate the Wave 7 client documentation lifecycle correction into feat/interfaces.
Integrate the resolved Wave 7 Standards and Simplify findings into feat/interfaces.
Merge the final review corrections for shared OIDC coordinator policy and domain terminology. Native synchronous and asynchronous transports remain separate.
Merge the final review corrections for atomic Configuration transitions and an internal server discovery implementation. Public ConfigurationEditor and canfar.server interfaces remain unchanged.
Comment thread canfar/server.py Fixed
Merge the final architecture correction. HTTPClient behavior is now exercised through native sync and async clients with MockTransport and lifecycle contexts instead of private helper assertions.
@shinybrar
shinybrar marked this pull request as ready for review August 18, 2026 10:09
Merge the focused corrections for every current github-code-quality thread on PR #276 while preserving the public server compatibility surface.
Comment thread tests/test_server.py Fixed
Merge the final test-only cleanup for the last github-code-quality thread on PR #276.
@shinybrar shinybrar changed the title Feat/interfaces refactor: contract CANFAR interfaces while preserving behavior Aug 18, 2026
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.

Contract CANFAR internal interfaces while preserving Science Platform behavior

2 participants