feat(ais_core): skeleton + pure-helper stubs (Issue #1a / Wave 1a)#476
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #469 (Issue #1a — Wave 1a, Foundation)
Summary
Skeleton-PR for the
ais_core/library: minimalpyproject.tomlforpackage-discovery and five empty stub modules with docstrings, type-hints,
__all__lists, andpass-bodies. No behaviour change in this PR; thestubs only raise
NotImplementedErrorand are placeholders for thereal implementations in #1b/#1c/#1d.
What's in this PR
pyproject.toml— minimal setuptools config, dynamic version fromVERSIONfile, packages-find includesais_core*. No[project.scripts], no CLI.ais_core/__init__.py— package docstring +__version__.ais_core/repo_resolve.py—ResolvedRepo+ 3 placeholderfunctions. Real logic in #1b.
ais_core/issue_resolve.py—ResolvedIssue+ 3 placeholders.ais_core/secret_filter.py— 3 placeholders + emptySECRED_PATTERNSlist. Real patterns in #1d.ais_core/json_contract.py—SCHEMA_VERSION = "1.0"+ 3placeholders. Real envelopes in #1c.
ais_core/run_state.py—RunState+ 3 placeholders. RealRun-ID + persistence in #1c.
tests/test_ais_core/— 5 smoke-test modules (one per stub),each verifying only: importability +
__all__presence + callablesignature. No behaviour tests (those land with #1b/#1c/#1d).
.gitignore— added*.pyc(caught__pycache__/during work).Out of scope (intentional, per Issue #1a scope)
aisconsole-script inpyproject.tomlscripts/solve_issues.pyetc.ais_core/functionTests
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 testsruns all repo testsincluding 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
ais_core/__init__.pyais_core/repo_resolve.pyais_core/issue_resolve.pyais_core/secret_filter.pyais_core/json_contract.pyais_core/run_state.pypyproject.tomltests/test_ais_core/).gitignore(delta)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 linesacross 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).