| Age | Commit message (Collapse) | Author |
|
Release v0.1.0 β promote development to production
|
|
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)
|
|
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)
|
|
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)
|
|
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)
|
|
- 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)
|
|
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)
|
|
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)
|
|
D1: Full README with install, migration, limitations
|
|
E8: Wire executeSearch, index lifecycle, buildSpec
|
|
E7: Add reindexAbstractDocument() + executeRequest()
|
|
E6: Wire setService() + identifier + host glue
|
|
E5: Add buildIndexMappings() helper
|
|
E4: Add buildTypeFilter() helper
|
|
E3: Add getSearchUri() helper
|
|
E2: Add getDocumentUri() helper
|
|
E1: Add setVersion() with strict validation
|
|
H1: Add VyOSElasticModernHost + placeholder engine
|
|
R3: Add .arcunit and .arclint engine configs
|
|
R2: Bootstrap libphutil library
|
|
ci(mergify): upgrade configuration to current format
|
|
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)
|
|
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)
|
|
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)
|
|
- 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)
|
|
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)
|
|
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)
|
|
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)
|
|
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)
|
|
tests
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
body/comment/projectPHID
π€ Generated by [robots](https://vyos.io)
|
|
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)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
TestDouble in tests
π€ Generated by [robots](https://vyos.io)
|
|
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)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
|
|
Plumbing: AGENTS.md + Copilot/CR/Mergify configs
|
|
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)
|
|
- 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)
|
|
|
|
- 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)
|
|
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)
|
|
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)
|