Skip to content

chore(config): drop four properties whose value has no effect - #3435

Merged
marevol merged 1 commit into
docs/normalise-config-property-headingsfrom
chore/drop-config-keys-with-no-consumer
Sep 10, 2026
Merged

chore(config): drop four properties whose value has no effect#3435
marevol merged 1 commit into
docs/normalise-config-property-headingsfrom
chore/drop-config-keys-with-no-consumer

Conversation

@marevol

@marevol marevol commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Stacked on #3434 — review that one first; this PR's diff against it is 3 files.

#3434 documented these four keys with a "Not read: …" caveat. This removes them instead,
which is what the caveat was really saying.

The four

key why it does nothing
theme.allowed.archive.extensions getThemeAllowedArchiveExtensions() has no caller. AdminThemeAction.hasZipExtension hardcodes endsWith(".zip").
theme.assets.cache.max.age getThemeAssetsCacheMaxAgeAsInteger() has no caller. StaticThemeResponder sends a literal public, max-age=86400 — equal to the default, so setting the key looks harmless and changes nothing.
theme.assets.precompressed isThemeAssetsPrecompressed() has no caller and there is no precompressed asset path; the responder sets Vary: Accept-Encoding but negotiates nothing.
rag.chat.message.max.length ChatApiHelper reads it through FessProp#getSystemProperty, which consults conf/system.properties, then -Dfess.system.<key>, then a literal "4000". It never reads fess_config.properties.

The first three are dead outright. The fourth is a live setting declared in the wrong
file
— it keeps working exactly as before through conf/system.properties; only the
inert declaration goes.

That last one is not a judgement call. 44 keys are read via getSystemProperty, and
this was the only one also declared in fess_config.properties.
The other 43 —
saml.*, spnego.*, oic.*, entraid.*, thumbnail.command.*, rag.llm.name,
api.chat.rate.limit.per.user.per.minute — are not. Removing it makes it consistent
rather than exceptional.

Nothing referenced them

A sweep of every repository in the workspace (*.java, *.jsp, *.xml, *.properties,
*.js, *.ts, *.rst, *.md, *.yaml) found the three theme keys only in
fess_config.properties and the generated FessConfig.java. No plugin, no JSP, no test,
no documentation page.

rag.chat.message.max.length keeps its documentation: fess-docs config/rag-chat.rst and
api/api-chat.rst already describe it in all seven languages, and already say "This value
is read as a System Property; the entry in fess_config.properties is not used." After
this, that sentence can lose its second half — a small fess-docs follow-up, not a gap.

What removal touched

Removing a key also removes what freegen generates from it, so FessConfig still matches
what a regeneration would emit:

before after
keys in fess_config.properties 639 635
String X = "…" constants 581 577
defaultMap.put entries 584 580

Exactly −4 in each, plus the 7 accessor declarations and 7 SimpleImpl bodies those keys
generated. keys-without-constant is 58 before and after — a pre-existing property of the
file, untouched here.

Also corrects ChatApiHelper#getMaxMessageLength's javadoc, which said the value came
"from fess_config system properties" and named the channel that does not apply.

Verification

  • mvn compile — BUILD SUCCESS.
  • mvn test for ChatApiHelperTest, ChatHandlerTest, FessConfigTest and the theme
    suites — 307 tests, 0 failures, 0 errors. The chat tests exercise the surviving
    getSystemProperty path, so the message-length limit is covered as still working.
  • mvn formatter:format && mvn license:format — no further changes.
  • Grep for each key and each generated constant across src/ — the only survivors are the
    live rag.chat.message.max.length consumer, its tests, and doc comments naming it.

Three of these have a generated FessConfig accessor and no caller
anywhere; the fourth is declared in the file that its reader never
consults. All four have been settable and inert.

- theme.allowed.archive.extensions: AdminThemeAction.hasZipExtension
  hardcodes endsWith(".zip").
- theme.assets.cache.max.age: StaticThemeResponder sends a literal
  "public, max-age=86400". That equals the default, so setting the key
  looks harmless and does nothing.
- theme.assets.precompressed: there is no precompressed asset path at
  all. The responder sets Vary: Accept-Encoding but negotiates nothing.
- rag.chat.message.max.length: ChatApiHelper reads it through
  FessProp#getSystemProperty, which consults conf/system.properties then
  -Dfess.system.<key> and never fess_config.properties. The setting
  itself keeps working; only the declaration in the wrong file goes.
  Of the 44 keys read that way, this was the only one also declared in
  fess_config.properties -- the other 43 are not, so this brings it into
  line rather than making it an exception.

Removing a key also removes its generated constant, accessors and
defaultMap entry, so FessConfig matches what freegen would now emit:
keys 639 to 635, constants 581 to 577, defaultMap 584 to 580.

Nothing else in the workspace referenced the three theme keys -- not a
plugin, a JSP, a test, or the documentation. rag.chat.message.max.length
stays documented in fess-docs config/rag-chat.rst and api/api-chat.rst,
where it is already described as a system property.

Also corrects ChatApiHelper#getMaxMessageLength's javadoc, which said
the value came "from fess_config system properties" and named the
channel that does not apply.
marevol added a commit to codelibs/fess-docs that referenced this pull request Sep 10, 2026
codelibs/fess#3435 removes four keys whose value had no effect: three
theme keys with no caller at all, and rag.chat.message.max.length, which
is read as a system property and was the only one of the 44 keys read
that way also declared in fess_config.properties.

Regenerated: 639 rows to 635.

rag-chat.rst described that key as "read as a System Property; the entry
in fess_config.properties is not used". The second half is now moot, so
it goes -- in all seven languages. Where to set it is unchanged.
@marevol
marevol added this pull request to stack #3436 September 10, 2026 22:52
@marevol marevol self-assigned this Sep 10, 2026
@marevol marevol added the task label Sep 10, 2026
@marevol marevol added this to the 15.9.0 milestone Sep 10, 2026
@marevol
marevol merged commit a180f12 into main Sep 10, 2026
2 checks passed
marevol added a commit to codelibs/fess-docs that referenced this pull request Sep 10, 2026
* docs: generate config/properties.rst from fess_config.properties

The configuration reference page was maintained by hand and had rotted.
Measured against fess_config.properties it was 120 keys short, and it
documented 10 keys that no longer exist -- several under a misspelling,
one of which (domain.tile) had acquired an invented description, "The
domain name of the tile server". It also existed only in English, and in
none of the seven config/index.rst toctrees, so it was published but
unreachable from navigation.

Generate the rows instead, and let a person write only the prose around
them.

  fess_config.properties    the keys, defaults, English descriptions,
                            headings and order. Edit there.
  <lang>/.../properties.po  the translations, per language and per
                            version. Edit these.
  <lang>/.../properties.rst generated between the GENERATED markers.

tools/gen_properties_doc.py reads the properties file, merges a gettext
catalogue, and rewrites the block, in the shape tools/update_eol.py
already established. It needs a fess checkout, so it is driven by
tools/update_properties_doc.sh and run by hand; nothing is vendored here.

That means --check cannot compare a page against fess. What it does
verify, offline and in CI, is that the seven pages still agree with each
other on keys, defaults and table layout, and that every string differing
from English is backed by a msgstr. That catches a page edited by hand,
which is the failure this replaces.

The page now exists in all seven languages and is in all seven toctrees.
The catalogues ship with every msgstr empty, so every language starts in
English and gains its translation as the catalogue is filled. Because the
catalogues live inside the version tree, create_version.sh carries them
forward with its existing cp -r.

* docs: regenerate after four properties were dropped from Fess

codelibs/fess#3435 removes four keys whose value had no effect: three
theme keys with no caller at all, and rag.chat.message.max.length, which
is read as a system property and was the only one of the 44 keys read
that way also declared in fess_config.properties.

Regenerated: 639 rows to 635.

rag-chat.rst described that key as "read as a System Property; the entry
in fess_config.properties is not used". The second half is now moot, so
it goes -- in all seven languages. Where to set it is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant