Henrik Jess Nielsen
ef3535048b
fix: Bicep module ref path — strip bicep/ prefix, lookup by ref_path
...
Build and Deploy iLSP / build-and-deploy (push) Successful in 1m29s
Build and Deploy iLSP / test (push) Successful in 24s
Two bugs fixed in BicepModuleCatalog:
1. as_completion_items() generated 'br/modules:bicep/modules/appservice:...'
but bicepconfig modulePath='bicep' means Bicep prepends 'bicep/' automatically.
Fix: store ref_path = path.removeprefix('bicep/') and use it in insertText.
Correct output: 'br/modules:modules/appservice:2.3.x'
2. version/param lookups used get_module_by_name() which only matches the last
path segment ('appservice'). New-style refs capture 'modules/appservice' from
the regex, so lookup returned empty. Fix: add get_module_by_ref() that matches
both ref_path and bare name.
Also fixes _iac_param_map to strip path prefix so IAC source descriptions
still enrich completions for 'modules/appservice' refs.
All 63 tests pass.
2026-05-10 16:10:36 +02:00
Henrik Jess Nielsen
b93aa84737
feat: param_value context — enum/allowed completions for principalType, environmentType etc.
...
Build and Deploy iLSP / test (push) Successful in 20s
Build and Deploy iLSP / build-and-deploy (push) Successful in 1m20s
- Add _KNOWN_ENUMS dict (principalType, principalObjectType, environmentType fallbacks)
- Add param_value_completion_items() to BicepModuleCatalog
- Detect 'param_value' context in _detect_context() (cursor after 'param: ' inside params block)
- Wire param_value into _inject_completions()
- 9 new unit tests (context detection, catalog allowed, known enum fallback, injection)
- Fix modules.py edit regression (param_completion_items was orphaned)
- All 35 tests pass
2026-05-10 15:30:31 +02:00
Henrik Jess Nielsen
27947e4f7f
feat: context-aware Bicep completions (version + param injection)
...
Build and Deploy iLSP / test (push) Failing after 27s
Build and Deploy iLSP / build-and-deploy (push) Has been skipped
- ProxySession tracks open documents per TCP connection
- _detect_context() identifies version, param, and module_path contexts
- version context: autocomplete versions for 'br/modules:NAME:' cursor positions
- param context: autocomplete params for specific module+version (with version fallback)
- modules.py: added get_module_by_name(), version_completion_items(), param_completion_items()
- 28/28 tests passing
2026-05-10 15:04:11 +02:00
Henrik Jess Nielsen
44da791f5a
fix: update tests to match thread-based proxy API (_frame, _inject_completions)
...
Build and Deploy iLSP / build-and-deploy (push) Successful in 2m6s
Build and Deploy iLSP / test (push) Successful in 19s
BicepProxy class and _ContentLengthFramer no longer exist after rewrite.
Tests now call module-level functions directly.
2026-05-10 13:35:40 +02:00
Henrik Jess Nielsen
cd17e9bfaa
Add unit tests, smoke test script, fix CI to debian-host + test job
...
Build and Deploy iLSP / test (push) Successful in 19s
Build and Deploy iLSP / build-and-deploy (push) Failing after 29s
- tests/test_catalog.py: 5 unit tests for PypiCatalog (fetch, cache, sort prefix, completions)
- tests/test_proxy.py: 5 unit tests for BicepProxy (framing, injection, list result, passthrough)
- tests/conftest.py: pytest asyncio_mode=auto config
- scripts/smoke_test.sh: end-to-end TCP + health smoke test script
- .gitea/workflows/ci.yml: split into test + build-and-deploy jobs (test blocks deploy)
- runs-on: debian-host (was ubuntu-latest = broken)
- test job installs deps + runs pytest before building image
- pyproject.toml: [project.optional-dependencies] dev = pytest + pytest-asyncio
2026-05-10 12:38:41 +02:00