summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-05-23Merge pull request #16 from vyos/developmentHEADv0.1.0productionYuriy Andamasov
Release v0.1.0 β€” promote development to production
2026-05-23Merge production into development (forward-merge plumbing)developmentYuriy Andamasov
Brings the plumbing commits from production into development before the v0.1.0 promotion PR (vyos/phorge-elasticsearch-modern#16) merges: - 82fa1fd: PR vyos/phorge-elasticsearch-modern#13 plumbing merge (AGENTS.md, .coderabbit.yaml, .mergify.yml, .github/copilot-instructions.md symlink) - ac5f615: symlink/Mergify config refinement - f83781c: PR vyos/phorge-elasticsearch-modern#14 Mergify deprecation auto-update Without this forward-merge, PR #16's diff would DELETE these governance files from production. Caught by Codex adversarial review on head SHA 3e8f4190. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Tests: refresh stale docblock after engine abstract→class revertYuriy Andamasov
The class docblock still described the engine as abstract, from before commit 011eec1 reverted 'abstract class' to plain 'class'. Updated wording to accurately describe the concrete engine and the test-double's role. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Engine: fix negative pagination bounds and _ts accumulationYuriy Andamasov
Two correctness bugs surfaced by CR / Phase 0, both inherited from the bundled PhabricatorElasticFulltextStorageEngine pattern: 1. executeSearch() did not validate that $offset / $limit were non-negative. PHP's (int) cast on a negative string yields a negative int, which would be passed unchecked to Elasticsearch. Add an explicit non-negative check before the existing upper- bound (offset + limit > 10000) check. 2. reindexAbstractDocument()'s relationship-data loop assigned the '_ts' field unconditionally instead of accumulating. For multi- valued relationships (multiple authorPHID, projectPHID, etc. entries on the same doc), only the last timestamp survived. Change to array-append, parallel to the PHID array. Both fixes diverge from the bundled engine; bundled retains the faithful-but-broken behavior. Worth fixing in this extension since we control the wire format. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Engine: revert abstract β†’ plain class for production dispatchYuriy Andamasov
A recent fixup cascade declared VyOSElasticModernFulltextStorageEngine as 'abstract class' to enable test-doubling subclasses (VyOSElasticModernHostTestEngine, VyOSElasticModernFulltextStorageEngineTestDouble). That change broke production dispatch: Phorge's PhutilClassMapQuery selects engines via PhutilSymbolLoader::loadObjects(), which calls setConcreteOnly(true) and unsets any class where reflection reports isAbstract(). The engine class would no longer be discoverable by cluster.search[].type:elasticsearch-modern, and the test-fixture subclasses live in src/__tests__/ which libphutil excludes from runtime class-map loading. Revert to plain 'class' (not 'final', not 'abstract'). Plain 'class' is discoverable by PhutilClassMapQuery; existing test fixtures keep working without rewrite; operators can subclass if they need to (harmless). Also update VyOSElasticModernHostTestCase::testPlaceholderEngineIsAbstract β†’ testEngineIsConcreteForDispatch, inverting the assertion to document the correct invariant and its rationale (setConcreteOnly reference). All 22 tests pass. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Address PR 16 CR findingsYuriy Andamasov
- README cluster.search example uses 'phabricator/' to match host default (was '/phabricator'; both work for index name but the host uses path verbatim for the base URI). - Add VERIFICATION.md placeholder with the planned smoke-test matrix template; status notes v0.1.0 is pending IS-474. - Engine reindex: replace 'if ($time)' falsy check with 'if ($time !== null)' so a Unix epoch timestamp (0) is not silently dropped. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23fix: correct Phase-0 findings from promotion PR review (3 issues)Yuriy Andamasov
1. TestDouble signatures: indexExists() and getIndexStats() in VyOSElasticModernFulltextStorageEngineTestDouble were missing the nullable host parameter added in E7/E8, causing a PHP fatal on 'arc unit --everything'. 2. buildSpec() zero-query sort bug: the falsy check (!$query->getParameter('query')) incorrectly treats the string '0' as empty (PHP falsy), enabling date-sorted path for a real search term. Changed to explicit null/empty-string checks to match the existing must-clause guard on line 316. All 22 unit tests now pass. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23fix: use correct HTTPFutureResponseStatus in indexExists() catch clauseYuriy Andamasov
Phase 0 CodeRabbit caught a typo β€” HTTPFutureHTTPResponseStatus does not exist in the libphutil type hierarchy; the correct class is HTTPFutureResponseStatus (consistent with line 257 in executeRequest()). πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Merge pull request #12 from vyos/task/d1-readmeYuriy Andamasov
D1: Full README with install, migration, limitations
2026-05-23Merge pull request #11 from vyos/task/e8-search-lifecycleYuriy Andamasov
E8: Wire executeSearch, index lifecycle, buildSpec
2026-05-23Merge pull request #10 from vyos/task/e7-reindexYuriy Andamasov
E7: Add reindexAbstractDocument() + executeRequest()
2026-05-23Merge pull request #9 from vyos/task/e6-setserviceYuriy Andamasov
E6: Wire setService() + identifier + host glue
2026-05-23Merge pull request #8 from vyos/task/e5-buildindexmappingsYuriy Andamasov
E5: Add buildIndexMappings() helper
2026-05-23Merge pull request #7 from vyos/task/e4-buildtypefilterYuriy Andamasov
E4: Add buildTypeFilter() helper
2026-05-23Merge pull request #6 from vyos/task/e3-getsearchuriYuriy Andamasov
E3: Add getSearchUri() helper
2026-05-23Merge pull request #5 from vyos/task/e2-getdocumenturiYuriy Andamasov
E2: Add getDocumentUri() helper
2026-05-23Merge pull request #4 from vyos/task/e1-setversionYuriy Andamasov
E1: Add setVersion() with strict validation
2026-05-23Merge pull request #3 from vyos/task/h1-host-classYuriy Andamasov
H1: Add VyOSElasticModernHost + placeholder engine
2026-05-23Merge pull request #15 from vyos/task/r3-arc-configsYuriy Andamasov
R3: Add .arcunit and .arclint engine configs
2026-05-23Merge pull request #1 from vyos/task/r2-libphutil-skeletonYuriy Andamasov
R2: Bootstrap libphutil library
2026-05-23Merge pull request #14 from vyos/mergify/configuration-deprecated-updateYuriy Andamasov
ci(mergify): upgrade configuration to current format
2026-05-23D1 fixup: split rollback guidance by migration stage to prevent read outageYuriy Andamasov
Step 9 previously said 'flip the new entry's roles back to {"read": false, "write": false} at any stage', which is unsafe after step 8 has already removed read from the ES 5 entry. Following that instruction post-step-8 would leave zero read-capable hosts, causing search errors for all in-flight requests. Split the rollback note into two sub-bullets: - Before step 8: removing the new entry is safe; ES 5 already serves reads. - After step 8: restore ES 5 read role first (or simultaneously), then disable the new entry. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Docs: Full README with install, migration, and limitationsYuriy Andamasov
Install steps include the verified load-libraries shape (flat array of paths) and explicit hosts[].roles config. Migration is the parallel-write cutover with health preflight and one-config-change rollback at every stage. Limitations call out the auth deferral, the missing timeout key, and the upstream extension-API instability. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23E8 fixup: four correctness fixes from Phase 0 reviewYuriy Andamasov
1. strlen(\$query_string) β†’ null-safe check \$query->getParameter('query') may return null; strlen(null) is deprecated in PHP 8.1+. Switch to explicit !== null && !== '' check. 2. ids.values nesting fix in buildSpec() 'values' => array(\$exclude) wraps an already-array \$exclude in a nested array, producing invalid Elasticsearch ids syntax. Cast to (array) then re-index with array_values() so both scalar PHID and array-of-PHIDs produce a flat list. 3. initIndex() host consistency: pass write host to indexExists() initIndex() called indexExists() without a host argument, which fell back to the read host, then deleted via getHostForWrite(). A read/write split lag window could cause false-positive "index doesn't exist" results. Pass the already-resolved write host. 4. getIndexStats() unchecked array access \$res['indices'][\$this->index] was accessed without verifying the key exists. If the index was just deleted or the name drifted, this throws an undefined-offset PHP notice. Add an explicit isset() guard with a clear exception message naming the index. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23E6-E8: Apply code-quality fixes from reviewYuriy Andamasov
- Remove dead $fields assignment in buildSpec() (copy-paste artifact from bundled engine; never actually used). - Revert executeSearch catch from Throwable back to Exception. The earlier lint-driven widening was over-broad: Error subclasses (TypeError, etc.) should propagate immediately, not be aggregated into the per-host failover loop. Comment added explaining the intent. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Engine: Wire executeSearch, index lifecycle, buildSpecYuriy Andamasov
Full public surface lands. executeSearch normalizes \$types before both URL building and body filter construction. buildSpec uses the bundled PhabricatorElasticsearchQueryBuilder (final, by composition) and emits bool.must_not.ids for the exclude parameter from day one. buildSpec also injects the body-level documentType filter via buildTypeFilter. indexExists/indexIsSane/initIndex/getIndexStats mirror the bundled engine but without the version-branching dead code. The private check() and normalizeConfigValue() helpers are copied verbatim from the bundled engine (no behavior difference). catch (Exception) widened to catch (Throwable) per XHP132. normalizeConfigValue() one-liners braced per XHP24. Lint clean. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23E7 fixup: move didHealthCheck(true) to HTTP-success boundary in executeRequest()Yuriy Andamasov
Previously the success health-check was called inside the JSON-decode try block. This was wrong: a valid HTTP 200 response with non-JSON body (e.g. ES maintenance page) would mark the host as *unhealthy* because JSON parse failure triggered didHealthCheck(false). The host is demonstrably reachable and responding; only the application layer failed. Move didHealthCheck(true) to immediately after list($body) = resolvex() succeeds, before the GET/non-GET branch. Remove the now-unnecessary didHealthCheck(false) from the JSON catch block β€” only network/timeout failures belong in the health-check false path. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Engine: Add reindexAbstractDocument() + executeRequest()Yuriy Andamasov
reindexAbstractDocument builds the document body with documentType as a real field (replacing the bundled engine's per-type URL segment), then PUTs to the typeless /_doc/{phid} URL via the new helper. executeRequest mirrors the bundled engine's HTTPSFuture pattern; it's private and not test-targeted directly (smoke tests in V1-V3 exercise the full wire path). πŸ€– Generated by [robots](https://vyos.io)
2026-05-23E6 fixup: use trim() + empty-string guard in setService(); use newEngine() ↡Yuriy Andamasov
in tests - str_replace('/', '', \$index) β†’ trim(\$index, '/') to preserve internal slashes in multi-segment index paths (e.g. 'phabricator/prod' must stay intact; only leading/trailing slashes are stripped). - Add empty-string guard: after trim, throw a clear exception if the result is '' so misconfigured paths fail loudly at setService() rather than silently at query time with a confusing endpoint URL. - Replace direct new VyOSElasticModernFulltextStorageEngine() in the four new test methods with \$this->newEngine() to avoid PHP fatal on abstract class instantiation. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23E5 fixup: detect intra-key duplicates in buildIndexMappings(); add collision ↡Yuriy Andamasov
tests πŸ€– Generated by [robots](https://vyos.io)
2026-05-23E5 fixup: guard buildIndexMappings() against reserved field name collisionsYuriy Andamasov
πŸ€– Generated by [robots](https://vyos.io)
2026-05-23E5 fixup: expand testBuildIndexMappingsShape coverage to ↡Yuriy Andamasov
body/comment/projectPHID πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Engine: Add buildIndexMappings() helper (single typeless mapping)Yuriy Andamasov
Single 'properties' block, documentType as a keyword field inside it, no include_in_all anywhere (the field was removed in ES 6). Relationships emit as keyword fields with doc_values: false, matching the bundled engine's ES-5-mode behavior. Field-data multi-analyzer shape (raw, keywords, stems) preserved. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23E4 fixup: use newEngine() helper in testBuildTypeFilter testsYuriy Andamasov
πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Engine: Add buildTypeFilter() helper (body-level documentType filter)Yuriy Andamasov
πŸ€– Generated by [robots](https://vyos.io)
2026-05-23E3 fixup: use newEngine() helper in testGetSearchUriYuriy Andamasov
πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Engine: Add getSearchUri() helper (typeless search endpoint)Yuriy Andamasov
πŸ€– Generated by [robots](https://vyos.io)
2026-05-23E2 fixup: use newEngine() helper in testGetDocumentUri testsYuriy Andamasov
πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Engine: Add getDocumentUri() helper for typeless document URLsYuriy Andamasov
πŸ€– Generated by [robots](https://vyos.io)
2026-05-23E1 fixup: initialize $version to null; getVersion() throws if unset; use ↡Yuriy Andamasov
TestDouble in tests πŸ€– Generated by [robots](https://vyos.io)
2026-05-23Engine: Add setVersion() with strict validationYuriy Andamasov
Engine accepts only versions 7 and above (covering ES 7.x, 8.x, and OpenSearch 1.x/2.x/3.x via the typeless API). Anything below 7 raises with a clear message pointing at the bundled engine for ES 5 users. πŸ€– Generated by [robots](https://vyos.io)
2026-05-23H1 fixup: catch exceptions in getConnectionStatus()Yuriy Andamasov
πŸ€– Generated by [robots](https://vyos.io)
2026-05-22ci(mergify): upgrade configuration to current formatmergify[bot]
2026-05-22Merge pull request #13 from vyos/task/repo-plumbingYuriy Andamasov
Plumbing: AGENTS.md + Copilot/CR/Mergify configs
2026-05-22Address CR finding: add language hint to repo-layout fenceYuriy Andamasov
markdownlint MD040 was flagged on AGENTS.md line 22 (the fence opening the repo-layout tree). Adding 'text' as the language hint per CR's proposed fix. πŸ€– Generated by [robots](https://vyos.io)
2026-05-22Add repo plumbing: AGENTS.md, Copilot instructions, CodeRabbit, MergifyYuriy Andamasov
- AGENTS.md: repo-level agent instructions (formerly CLAUDE.md convention; renamed under T8595). - .github/copilot-instructions.md: symlink to ../AGENTS.md; the VyOS fleet pattern for unifying Copilot instructions with the same source as the AGENTS.md file. - .coderabbit.yaml: inheritance: true, extends org central baseline, adds production, development, and task/.* to auto_review.base_branches. The central baseline is vyos-1x-shaped and does not cover this repo's production/development/task/* model β€” without this override, CR auto-review silently skips every PR in this repo. - .mergify.yml: extends org central baseline (extends: mergify). πŸ€– Generated by [robots](https://vyos.io)
2026-05-22H1: keep placeholder engine undiscoverablecopilot-swe-agent[bot]
2026-05-22H1: Apply code-quality fixes from reviewYuriy Andamasov
- Engine class marked final (matches host class declaration; no design intent to subclass). - testConfigOverrides now also asserts host and port (these were the most-likely-to-be-misconfigured fields; previously set but unverified). πŸ€– Generated by [robots](https://vyos.io)
2026-05-22Add VyOSElasticModernHost + placeholder engine stubYuriy Andamasov
Host class mirrors PhabricatorElasticsearchHost's surface. Engine is a stub providing only getEngineIdentifier() and getHostType() so the host's tests can construct an engine instance; real engine implementation lands in subsequent commits. All six abstract methods of PhabricatorFulltextStorageEngine are implemented (four as throwing stubs to be replaced in E7/E8). .arcconfig gains "src/" in the load list so arc unit can discover the extension library; test case extends PhutilTestCase (no DB needed for pure-PHP host property assertions). πŸ€– Generated by [robots](https://vyos.io)
2026-05-22Add .arcunit and .arclint engine configsYuriy Andamasov
Required prerequisites for 'arc unit' and 'arc lint' which were assumed to work in the plan. .arcunit declares the phutil unit engine on PHP files. .arclint declares the standard Phorge linter set targeting PHP 7.4 (the upstream floor). πŸ€– Generated by [robots](https://vyos.io)