<feed xmlns='http://www.w3.org/2005/Atom'>
<title>phorge-elasticsearch-modern.git/src/__tests__, branch development</title>
<subtitle>Phorge full-text search extension for Elasticsearch 7.x / 8.x / OpenSearch via the typeless API (mirror of https://github.com/vyos/phorge-elasticsearch-modern.git)
</subtitle>
<id>https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/atom?h=development</id>
<link rel='self' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/atom?h=development'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/'/>
<updated>2026-05-23T14:23:31+00:00</updated>
<entry>
<title>Tests: refresh stale docblock after engine abstract→class revert</title>
<updated>2026-05-23T14:23:31+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-05-23T14:23:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/commit/?id=3e8f4190bf666133b59112e351071c8d92b77def'/>
<id>urn:sha1:3e8f4190bf666133b59112e351071c8d92b77def</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>Engine: revert abstract → plain class for production dispatch</title>
<updated>2026-05-23T12:48:18+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-05-23T12:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/commit/?id=011eec12f9176a6a8b8d8b9133bc00107a7855c0'/>
<id>urn:sha1:011eec12f9176a6a8b8d8b9133bc00107a7855c0</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>fix: correct Phase-0 findings from promotion PR review (3 issues)</title>
<updated>2026-05-23T12:14:02+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-05-23T12:14:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/commit/?id=4d27ac74aff1ca47db53510bf07e9d083635175b'/>
<id>urn:sha1:4d27ac74aff1ca47db53510bf07e9d083635175b</id>
<content type='text'>
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-&gt;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)
</content>
</entry>
<entry>
<title>E8 fixup: four correctness fixes from Phase 0 review</title>
<updated>2026-05-23T10:55:22+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-05-23T10:54:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/commit/?id=4d836601cb2f602c0089134eda1604f605fb39da'/>
<id>urn:sha1:4d836601cb2f602c0089134eda1604f605fb39da</id>
<content type='text'>
1. strlen(\$query_string) → null-safe check
   \$query-&gt;getParameter('query') may return null; strlen(null) is
   deprecated in PHP 8.1+. Switch to explicit !== null &amp;&amp; !== '' check.

2. ids.values nesting fix in buildSpec()
   'values' =&gt; 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-&gt;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)
</content>
</entry>
<entry>
<title>E6 fixup: use trim() + empty-string guard in setService(); use newEngine() in tests</title>
<updated>2026-05-23T10:44:01+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-05-23T10:44:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/commit/?id=f945e302f79086c6ea99bd45d414fe6bccefb9d4'/>
<id>urn:sha1:f945e302f79086c6ea99bd45d414fe6bccefb9d4</id>
<content type='text'>
- 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-&gt;newEngine() to avoid PHP fatal on
  abstract class instantiation.

🤖 Generated by [robots](https://vyos.io)
</content>
</entry>
<entry>
<title>E5 fixup: detect intra-key duplicates in buildIndexMappings(); add collision tests</title>
<updated>2026-05-23T10:31:46+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-05-23T10:31:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/commit/?id=de83584f8b782bde516d6b39f9f1bc4214585058'/>
<id>urn:sha1:de83584f8b782bde516d6b39f9f1bc4214585058</id>
<content type='text'>
🤖 Generated by [robots](https://vyos.io)
</content>
</entry>
<entry>
<title>E5 fixup: expand testBuildIndexMappingsShape coverage to body/comment/projectPHID</title>
<updated>2026-05-23T10:25:30+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-05-23T10:25:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/commit/?id=9259fbf741f4a080285fbdd8d8586681558c0ab6'/>
<id>urn:sha1:9259fbf741f4a080285fbdd8d8586681558c0ab6</id>
<content type='text'>
🤖 Generated by [robots](https://vyos.io)
</content>
</entry>
<entry>
<title>Engine: Add buildIndexMappings() helper (single typeless mapping)</title>
<updated>2026-05-23T10:25:01+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-05-22T08:40:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/commit/?id=fc0e71e28e49d9cdc84fadfda40692bdfc415a6c'/>
<id>urn:sha1:fc0e71e28e49d9cdc84fadfda40692bdfc415a6c</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>E4 fixup: use newEngine() helper in testBuildTypeFilter tests</title>
<updated>2026-05-23T10:23:14+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-05-23T10:23:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/commit/?id=67d619a782eef8df6437525c45a63c9485c13a6a'/>
<id>urn:sha1:67d619a782eef8df6437525c45a63c9485c13a6a</id>
<content type='text'>
🤖 Generated by [robots](https://vyos.io)
</content>
</entry>
<entry>
<title>Engine: Add buildTypeFilter() helper (body-level documentType filter)</title>
<updated>2026-05-23T10:22:40+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-05-22T08:38:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/phorge-elasticsearch-modern.git/commit/?id=a529a40ec8569a7010df4965c4e7fff9e81eb125'/>
<id>urn:sha1:a529a40ec8569a7010df4965c4e7fff9e81eb125</id>
<content type='text'>
🤖 Generated by [robots](https://vyos.io)
</content>
</entry>
</feed>
