Skip to content

feat(ais_core): skeleton + pure-helper stubs (Issue #1a / Wave 1a)#476

Merged
SaJaToGu merged 2 commits into
developfrom
ais-fix-469-skeleton
Jun 28, 2026
Merged

feat(ais_core): skeleton + pure-helper stubs (Issue #1a / Wave 1a)#476
SaJaToGu merged 2 commits into
developfrom
ais-fix-469-skeleton

Conversation

@SaJaToGu

Copy link
Copy Markdown
Owner

Closes #469 (Issue #1a — Wave 1a, Foundation)

Summary

Skeleton-PR for the ais_core/ library: minimal pyproject.toml for
package-discovery and five empty stub modules with docstrings, type-hints,
__all__ lists, and pass-bodies. No behaviour change in this PR; the
stubs only raise NotImplementedError and are placeholders for the
real implementations in #1b/#1c/#1d.

What's in this PR

  • pyproject.toml — minimal setuptools config, dynamic version from
    VERSION file, packages-find includes ais_core*. No
    [project.scripts], no CLI.
  • ais_core/__init__.py — package docstring + __version__.
  • ais_core/repo_resolve.pyResolvedRepo + 3 placeholder
    functions. Real logic in #1b.
  • ais_core/issue_resolve.pyResolvedIssue + 3 placeholders.
  • ais_core/secret_filter.py — 3 placeholders + empty
    SECRED_PATTERNS list. Real patterns in #1d.
  • ais_core/json_contract.pySCHEMA_VERSION = "1.0" + 3
    placeholders. Real envelopes in #1c.
  • ais_core/run_state.pyRunState + 3 placeholders. Real
    Run-ID + persistence in #1c.
  • tests/test_ais_core/ — 5 smoke-test modules (one per stub),
    each verifying only: importability + __all__ presence + callable
    signature. No behaviour tests (those land with #1b/#1c/#1d).
  • .gitignore — added *.pyc (caught __pycache__/ during work).

Out of scope (intentional, per Issue #1a scope)

Tests

python3 -m unittest tests.test_ais_core.test_repo_resolve \ tests.test_ais_core.test_issue_resolve \ tests.test_ais_core.test_secret_filter \ tests.test_ais_core.test_json_contract \ tests.test_ais_core.test_run_state -v

→ 11 tests, 0.019s, all OK.

(Note: python -m unittest discover -s tests runs all repo tests
including ones not related to this PR and was timing out in the
shared dev shell; for this PR only the ais_core smoke tests are
relevant.)

LOC Summary

File Lines
ais_core/__init__.py 17
ais_core/repo_resolve.py 64
ais_core/issue_resolve.py 59
ais_core/secret_filter.py 44
ais_core/json_contract.py 55
ais_core/run_state.py 65
pyproject.toml 14
Total (stub + config) 318
Tests (tests/test_ais_core/) 156
.gitignore (delta) +4

Stub-LOC is above the < 200 net soft-budget because each module has
a substantial module-docstring + per-function docstrings + type-hints

  • __all__ declarations. The pure pass-body code itself is < 50 lines
    across all 5 modules. If the user prefers tighter stubs for the
    skeleton phase, the docstrings can be trimmed in a follow-up.

Parent issue

Part of #468 (Release 0.10.0 — AIS Tooling Interface).

SaJaToGu added 2 commits June 28, 2026 09:05
- pyproject.toml (NEW, minimal): package-discovery for ais_core,
  dynamic version from VERSION file, setuptools build-backend. No
  console-scripts, no CLI.
- ais_core/__init__.py (NEW): package docstring + __version__.
- ais_core/repo_resolve.py (NEW stub): ResolvedRepo NamedTuple +
  resolve_repo_hint/resolve_from_owner_repo/resolve_from_git_remote
  placeholders that raise NotImplementedError. Real logic in #1b.
- ais_core/issue_resolve.py (NEW stub): ResolvedIssue NamedTuple +
  fetch_issue/find_open_issues/issue_is_ai_solvable placeholders.
- ais_core/secret_filter.py (NEW stub): redact_secrets/redact_dict/
  redact_list placeholders. SECRED_PATTERNS = []. Real patterns in #1d.
- ais_core/json_contract.py (NEW stub): SCHEMA_VERSION='1.0' +
  success_envelope/error_envelope/validate_envelope placeholders.
- ais_core/run_state.py (NEW stub): RunState NamedTuple +
  make_run_id/save_state/load_state placeholders.
- tests/test_ais_core/ (NEW): 5 smoke-test modules, one per stub.
  Tests verify only import + __all__ + callable presence. No behaviour.
- .gitignore: *.pyc pattern.

Refs #469
- Rename SECRED_PATTERNS -> SECRET_PATTERNS (typo fix; matches
  expected public spelling). Updated in ais_core/secret_filter.py
  (constant + __all__) and tests/test_ais_core/test_secret_filter.py.
- Remove ais_core.__version__ = '0.9.0' from package __init__.py.
  Version lives in VERSION file (consumed by pyproject.toml's
  dynamic = ['version']) and importlib.metadata. Hard-coding here
  would create a duplicate source-of-truth that drifts at
  release time.
- .gitignore: drop the leftover 'Found __pycache__' comment lines
  from the earlier commit; *.pyc and __pycache__/ are already
  covered by the existing Python section.
- Newline-at-EOF: ensure all newly added files end with a single
  trailing newline (PEP 8 W292).

Tests: 11 OK in 0.024s (test_ais_core.{repo_resolve,issue_resolve,
secret_filter,json_contract,run_state}). No behaviour change.

Refs #469, #476
@SaJaToGu
SaJaToGu merged commit 486bc5f into develop Jun 28, 2026
2 checks passed
@SaJaToGu
SaJaToGu deleted the ais-fix-469-skeleton branch June 28, 2026 08:28
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.

0.10.0 Issue #1a — ais_core Skeleton + pure helpers (Foundation)

1 participant